mirror of
https://github.com/snapotter-hq/SnapOtter.git
synced 2026-08-03 07:46:42 +02:00
test: expand E2E-Docker coverage to all 47 tools with auth-failure tests
This commit is contained in:
@@ -543,3 +543,27 @@ test.describe("Border — extended", () => {
|
||||
expect(body.processedSize).toBeGreaterThan(0);
|
||||
});
|
||||
});
|
||||
|
||||
// ─── Auth Failure ──────────────────────────────────────────────────
|
||||
|
||||
test.describe("Auth failure", () => {
|
||||
test("split without token returns 401", async ({ request }) => {
|
||||
const res = await request.post("/api/v1/tools/split", {
|
||||
multipart: {
|
||||
file: { name: "test.png", mimeType: "image/png", buffer: PNG_200x150 },
|
||||
settings: JSON.stringify({ columns: 2, rows: 2 }),
|
||||
},
|
||||
});
|
||||
expect(res.status()).toBe(401);
|
||||
});
|
||||
|
||||
test("border without token returns 401", async ({ request }) => {
|
||||
const res = await request.post("/api/v1/tools/border", {
|
||||
multipart: {
|
||||
file: { name: "test.png", mimeType: "image/png", buffer: PNG_200x150 },
|
||||
settings: JSON.stringify({ size: 10, color: "#ff0000" }),
|
||||
},
|
||||
});
|
||||
expect(res.status()).toBe(401);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user