Skip to content
This repository was archived by the owner on Jul 8, 2025. It is now read-only.

Commit 2931de8

Browse files
committed
fix: failing test
1 parent b2274a6 commit 2931de8

File tree

2 files changed

+15
-3
lines changed

2 files changed

+15
-3
lines changed

src/features/workspace/components/__tests__/workspace-name.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ test('can rename workspace', async () => {
2020
await userEvent.click(getByRole('button', { name: /save/i }))
2121

2222
await waitFor(() => {
23-
expect(getByText(/renamed workspace to "baz-qux"/i)).toBeVisible()
23+
expect(getByText(/updated workspace/i)).toBeVisible()
2424
})
2525
})
2626

src/mocks/msw/handlers.ts

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,18 @@ export const handlers = [
5858
mswEndpoint('/api/v1/workspaces/active'),
5959
() => new HttpResponse(null, { status: 204 })
6060
),
61+
http.put(mswEndpoint('/api/v1/workspaces/:workspace_name'), () =>
62+
HttpResponse.json(
63+
{
64+
name: 'foo',
65+
config: {
66+
custom_instructions: '',
67+
muxing_rules: [],
68+
},
69+
},
70+
{ status: 201 }
71+
)
72+
),
6173
http.post(
6274
mswEndpoint('/api/v1/workspaces/archive/:workspace_name/recover'),
6375
() => new HttpResponse(null, { status: 204 })
@@ -105,8 +117,8 @@ export const handlers = [
105117
mswEndpoint('/api/v1/workspaces/:workspace_name/custom-instructions'),
106118
() => new HttpResponse(null, { status: 204 })
107119
),
108-
http.get(mswEndpoint("/api/v1/workspaces/:workspace_name/muxes"), () =>
109-
HttpResponse.json([]),
120+
http.get(mswEndpoint('/api/v1/workspaces/:workspace_name/muxes'), () =>
121+
HttpResponse.json([])
110122
),
111123
http.put(
112124
mswEndpoint('/api/v1/workspaces/:workspace_name/muxes'),

0 commit comments

Comments
 (0)