openpanel/packages/nestjsx-crud/test/updateMany/index.spec.ts
Stefan Pejcic 8595a9f4e5 back
2024-05-08 19:58:53 +02:00

22 lines
558 B
TypeScript

import axios from "axios";
import JsonServer from "../../src/index";
import "./index.mock";
describe("updateMany", () => {
it("correct response", async () => {
const { data } = await JsonServer(
"https://api.nestjsx-crud.refine.dev",
axios,
).updateMany!({
resource: "posts",
ids: ["f1d6e030-4d70-44d4-98dd-8786f197c640"],
variables: {
title: "updated-title-1",
},
});
expect(data[0]["title"]).toBe("updated-title-1");
});
});