mirror of
https://github.com/stefanpejcic/openpanel
synced 2025-06-26 18:28:26 +00:00
22 lines
558 B
TypeScript
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");
|
|
});
|
|
});
|