test(session): cover workspace-routed messages (#26576)
This commit is contained in:
@@ -364,8 +364,15 @@ describe("session HttpApi", () => {
|
|||||||
headers: { "x-opencode-directory": tmp.path, "content-type": "application/json" },
|
headers: { "x-opencode-directory": tmp.path, "content-type": "application/json" },
|
||||||
body: JSON.stringify({ title: "workspace session" }),
|
body: JSON.stringify({ title: "workspace session" }),
|
||||||
})
|
})
|
||||||
|
const messages = yield* request(
|
||||||
|
`${pathFor(SessionPaths.messages, { sessionID: created.id })}?workspace=${workspace.id}`,
|
||||||
|
{
|
||||||
|
headers: { "x-opencode-directory": tmp.path },
|
||||||
|
},
|
||||||
|
)
|
||||||
|
|
||||||
expect(created).toMatchObject({ id: created.id, workspaceID: workspace.id })
|
expect(created).toMatchObject({ id: created.id, workspaceID: workspace.id })
|
||||||
|
expect(messages.status).toBe(200)
|
||||||
expect(
|
expect(
|
||||||
yield* Effect.sync(() =>
|
yield* Effect.sync(() =>
|
||||||
Database.use((db) =>
|
Database.use((db) =>
|
||||||
|
|||||||
Reference in New Issue
Block a user