it("#create", async () => {
axiosMock
- .onPost("/resource/")
+ .onPost("/resource")
.reply(200, { owner_uuid: "ownerUuidValue" });
const commonResourceService = new CommonResourceService(axiosInstance, "resource", actions);
axiosInstance.post = jest.fn(() => Promise.resolve({data: {}}));
const commonResourceService = new CommonResourceService(axiosInstance, "resource", actions);
await commonResourceService.create({ ownerUuid: "ownerUuidValue" });
- expect(axiosInstance.post).toHaveBeenCalledWith("/resource/", {owner_uuid: "ownerUuidValue"});
+ expect(axiosInstance.post).toHaveBeenCalledWith("/resource", {owner_uuid: "ownerUuidValue"});
});
it("#delete", async () => {
it("#list", async () => {
axiosMock
- .onGet("/resource/")
+ .onGet("/resource")
.reply(200, {
kind: "kind",
offset: 2,
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/", {
+ expect(axiosInstance.post).toHaveBeenCalledWith("/groups", {
name: "nameValue",
group_class: "project"
});
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")