Skip to content

armgit / dub

Public Imported from GitHub
0

The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.

wip

Kiran K2824149b5667
diff --git a/apps/web/tests/workspaces/retrieve-workspace.test.ts b/apps/web/tests/workspaces/retrieve-workspace.test.ts
new file mode 100644
index 0000000000..21ba8862ee
--- /dev/null
+++ b/apps/web/tests/workspaces/retrieve-workspace.test.ts
@@ -0,0 +1,32 @@
+import { Project } from "@prisma/client";
+import { describe, expect, test } from "vitest";
+import { HttpClient } from "../utils/http";
+import { IntegrationHarness } from "../utils/integration";
+
+describe("retrieve a workspace", async () => {
+ test("by id", async (ctx) => {
+ const h = new IntegrationHarness(ctx);
+ const { workspace, apiKey } = await h.init();
+
+ const http = new HttpClient({
+ baseUrl: h.baseUrl,
+ headers: {
+ Authorization: `Bearer ${apiKey.token}`,
+ },
+ });
+
+ const { status, data: workspaceFetched } = await http.get<Project>({
+ path: `/workspaces/${workspace.id}`,
+ });
+
+ expect(status).toEqual(200);
+ expect(workspaceFetched).toEqual({
+ workspace,
+ domains: [],
+ });
+
+ // await http.delete({
+ // path: `/workspaces/ws_${workspace.id}`,
+ // });
+ });
+});