refs # Merge branch 'origin/load-resource-crash-fix'
[arvados-workbench2.git] / src / services / groups-service / groups-service.test.ts
index c3be8bdaa8a6ecfa58a1553b7de57483481ff86b..95355440e8e067a212d47a262b8a9c329f877b2d 100644 (file)
@@ -5,18 +5,24 @@
 import axios from "axios";
 import MockAdapter from "axios-mock-adapter";
 import { GroupsService } from "./groups-service";
+import { ApiActions } from "~/services/api/api-actions";
 
 describe("GroupsService", () => {
 
     const axiosMock = new MockAdapter(axios);
 
+    const actions: ApiActions = {
+        progressFn: (id: string, working: boolean) => {},
+        errorFn: (id: string, message: string) => {}
+    };
+
     beforeEach(() => {
         axiosMock.reset();
     });
 
     it("#contents", async () => {
         axiosMock
-            .onGet("/groups/1/contents/")
+            .onGet("/groups/1/contents")
             .reply(200, {
                 kind: "kind",
                 offset: 2,
@@ -27,7 +33,7 @@ describe("GroupsService", () => {
                 items_available: 20
             });
 
-        const groupsService = new GroupsService(axios);
+        const groupsService = new GroupsService(axios, actions);
         const resource = await groupsService.contents("1", { limit: 10, offset: 1 });
         expect(resource).toEqual({
             kind: "kind",