X-Git-Url: https://git.arvados.org/arvados-workbench2.git/blobdiff_plain/25216cc7acedc987c26a159f0b640210c0ef101e..f0b5bf0ef88fdd06e96cf0c685ab49c2ea4ec035:/src/services/common-service/common-resource-service.test.ts diff --git a/src/services/common-service/common-resource-service.test.ts b/src/services/common-service/common-resource-service.test.ts index a64fb029..7f47f20e 100644 --- a/src/services/common-service/common-resource-service.test.ts +++ b/src/services/common-service/common-resource-service.test.ts @@ -5,7 +5,7 @@ import { CommonResourceService } from "./common-resource-service"; import axios, { AxiosInstance } from "axios"; import MockAdapter from "axios-mock-adapter"; -import { Resource } from "src/models/resource"; +import { Resource } from "models/resource"; import { ApiActions } from "services/api/api-actions"; const actions: ApiActions = { @@ -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 () => {