aboutsummaryrefslogtreecommitdiffstats
path: root/packages/trpc/routers/bookmarks.test.ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/trpc/routers/bookmarks.test.ts')
-rw-r--r--packages/trpc/routers/bookmarks.test.ts15
1 files changed, 15 insertions, 0 deletions
diff --git a/packages/trpc/routers/bookmarks.test.ts b/packages/trpc/routers/bookmarks.test.ts
index 5219e522..9fcbec52 100644
--- a/packages/trpc/routers/bookmarks.test.ts
+++ b/packages/trpc/routers/bookmarks.test.ts
@@ -169,7 +169,22 @@ describe("Bookmark Routes", () => {
"tag2",
"tag3",
"tag4",
+ "tag5",
]);
+
+ await expect(() =>
+ api.updateTags({ bookmarkId: bookmark.id, attach: [{}], detach: [] }),
+ ).rejects.toThrow(/You must provide either a tagId or a tagName/);
+ await expect(() =>
+ api.updateTags({ bookmarkId: bookmark.id, attach: [], detach: [{}] }),
+ ).rejects.toThrow(/You must provide either a tagId or a tagName/);
+ await expect(() =>
+ api.updateTags({
+ bookmarkId: bookmark.id,
+ attach: [{ tagName: "" }],
+ detach: [{}],
+ }),
+ ).rejects.toThrow(/You must provide either a tagId or a tagName/);
});
test<CustomTestContext>("update bookmark text", async ({ apiCallers }) => {