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

30 lines
776 B
TypeScript

import { dataProvider } from "../../src";
import supabaseClient from "../supabaseClient";
import "./index.mock";
describe("update", () => {
it("correct response with `select`", async () => {
const { data } = await dataProvider(supabaseClient).update({
id: 1246,
resource: "posts",
variables: {
title: "test",
categoryId: 52,
content: "test content",
},
meta: {
select: "*",
},
});
expect(data).toEqual(
expect.objectContaining({
id: 1246,
title: "test",
categoryId: 52,
content: "test content",
}),
);
});
});