Merge branch '17595-Selecting-multiple-collections-as-inputs-to-a-workflow'
[arvados-workbench2.git] / src / services / project-service / project-service.test.ts
index 9052360627c6f68ff0d95253efa6b0f4ae88bc55..71e8b6d086843bbaf983cd8f9f70791f1705ab45 100644 (file)
@@ -18,9 +18,11 @@ describe("CommonResourceService", () => {
         axiosInstance.post = jest.fn(() => Promise.resolve({ data: {} }));
         const projectService = new ProjectService(axiosInstance, actions);
         const resource = await projectService.create({ name: "nameValue" });
-        expect(axiosInstance.post).toHaveBeenCalledWith("/groups/", {
-            name: "nameValue",
-            group_class: "project"
+        expect(axiosInstance.post).toHaveBeenCalledWith("/groups", {
+            group: {
+                name: "nameValue",
+                group_class: "project"
+            }
         });
     });
 
@@ -28,10 +30,10 @@ describe("CommonResourceService", () => {
         axiosInstance.get = jest.fn(() => Promise.resolve({ data: {} }));
         const projectService = new ProjectService(axiosInstance, actions);
         const resource = await projectService.list();
-        expect(axiosInstance.get).toHaveBeenCalledWith("/groups/", {
+        expect(axiosInstance.get).toHaveBeenCalledWith("/groups", {
             params: {
                 filters: "[" + new FilterBuilder()
-                    .addEqual("groupClass", "project")
+                    .addIn("group_class", ["project", "filter"])
                     .getFilters() + "]",
                 order: undefined
             }