1 // Copyright (C) The Arvados Authors. All rights reserved.
3 // SPDX-License-Identifier: AGPL-3.0
5 import axios from "axios";
6 import MockAdapter from "axios-mock-adapter";
7 import { GroupsService } from "./groups-service";
8 import { ApiActions } from "~/services/api/api-actions";
10 describe("GroupsService", () => {
12 const axiosMock = new MockAdapter(axios);
14 const actions: ApiActions = {
15 progressFn: (id: string, working: boolean) => {},
16 errorFn: (id: string, message: string) => {}
23 it("#contents", async () => {
25 .onGet("/groups/1/contents")
36 const groupsService = new GroupsService(axios, actions);
37 const resource = await groupsService.contents("1", { limit: 10, offset: 1 });
38 expect(resource).toEqual({