test(server): align instance environment auth errors

This commit is contained in:
Devin Foley committed 2026-06-20 00:57:10 -07:00
1 parent eea8da12aa
commit 2fd3fa44de
1 file changed
+3 -3
@@ -328,7 +328,7 @@ describe("environment routes", () => {
const res = await request(app).get("/api/companies/company-1/environments");
expect(res.status).toBe(403);
expect(res.body.error).toContain("board operators");
expect(res.body.error).toContain("Board access required");
expect(mockEnvironmentService.list).not.toHaveBeenCalled();
});
@@ -352,7 +352,7 @@ describe("environment routes", () => {
const res = await request(app).get("/api/environments/env-1");
expect(res.status).toBe(403);
expect(res.body.error).toContain("board operators");
expect(res.body.error).toContain("Board access required");
});
it("creates an environment and logs activity", async () => {
@@ -1056,7 +1056,7 @@ describe("environment routes", () => {
const res = await request(app).get("/api/companies/company-1/environments");
expect(res.status).toBe(403);
expect(res.body.error).toContain("board operators");
expect(res.body.error).toContain("Board access required");
expect(mockEnvironmentService.list).not.toHaveBeenCalled();
});