mirror of
https://github.com/stefanpejcic/openpanel
synced 2025-06-26 18:28:26 +00:00
21 lines
510 B
TypeScript
21 lines
510 B
TypeScript
import { dataProvider } from "../../src/index";
|
|
import { client } from "../appwriteClient";
|
|
import "./index.mock";
|
|
|
|
describe("update", () => {
|
|
it("correct response", async () => {
|
|
const { data } = await dataProvider(client, {
|
|
databaseId: "default",
|
|
}).update({
|
|
resource: "blog_posts",
|
|
id: "669e49f3001cb7c76d6b",
|
|
variables: {
|
|
title: "Updated",
|
|
},
|
|
});
|
|
|
|
expect(data.id).toEqual("669e49f3001cb7c76d6b");
|
|
expect(data.title).toEqual("Updated");
|
|
});
|
|
});
|