Skip to content

armgit / kaneo

Public Imported from GitHub
0

⚡ Project management that doesn't become the project. Boards, Gantt charts, and GitHub integration. Self-host it or use Kaneo Cloud.

test(api): check missing permissions on the API key scope error

Andrej9f389a9de1ae
diff --git a/tests/api-integration/api-key-mixed-credentials.test.ts b/tests/api-integration/api-key-mixed-credentials.test.ts
index d384abaa6..c26d9438e 100644
--- a/tests/api-integration/api-key-mixed-credentials.test.ts
+++ b/tests/api-integration/api-key-mixed-credentials.test.ts
@@ -79,9 +79,10 @@ describe("API integration: API key sent with an invalid bearer token", () => {
const keyOnly = await createProject({ "x-api-key": key });
expect(keyOnly.status).toBe(403);
- expect(await readErrorBody(keyOnly)).toMatchObject({
+ expect(await readErrorBody(keyOnly)).toEqual({
message: "Insufficient API key scope",
code: "API_KEY_SCOPE",
+ missingPermissions: ["project:create"],
});
const mixed = await createProject({ "x-api-key": key, ...invalidBearer });