Additional test

This commit is contained in:
Tom Moor committed 2025-03-01 17:18:24 -05:00
1 parent 9334b74fb5
commit a007c7a479
1 file changed
+22
+22
View File
@@ -58,6 +58,28 @@ describe("#shares.list", () => {
});
it("should allow filtering by document title", async () => {
const user = await buildUser();
const document = await buildDocument({
userId: user.id,
teamId: user.teamId,
});
await buildShare({
documentId: document.id,
teamId: user.teamId,
userId: user.id,
});
const res = await server.post("/api/shares.list", {
body: {
token: user.getJwtToken(),
query: "test",
},
});
const body = await res.json();
expect(res.status).toEqual(200);
expect(body.data.length).toEqual(0);
});
it("should allow filtering by document title and return matching shares", async () => {
const user = await buildUser();
await buildDocument({
userId: user.id,