15768: removed submit func from ms popover Arvados-DCO-1.1-Signed-off-by: Lisa Knox...
[arvados.git] / src / services / common-service / common-resource-service.test.ts
index b94756ae02f18f0cf7f8ebaa85ec5dc950b17fbc..7f47f20ef77f296795b9003b1ef1df00ff679401 100644 (file)
@@ -136,8 +136,9 @@ describe("CommonResourceService", () => {
         await commonResourceService.list({ filters: tooBig });
         expect(axiosMock.history.get.length).toBe(0);
         expect(axiosMock.history.post.length).toBe(1);
-        expect(axiosMock.history.post[0].data.get('filters')).toBe(`[${tooBig}]`);
-        expect(axiosMock.history.post[0].params._method).toBe('GET');
+        const postParams = new URLSearchParams(axiosMock.history.post[0].data);
+        expect(postParams.get('filters')).toBe(`[${tooBig}]`);
+        expect(postParams.get('_method')).toBe('GET');
     });
 
     it("#list using GET when query string is not too big", async () => {