Skip to content

Commit 10cb266

Browse files
committed
Fix test
1 parent 3607447 commit 10cb266

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

tests/invites-v2.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,13 +76,13 @@ describe("V2 Invite API Tests", () => {
7676
});
7777

7878
test("should reject slugs that are too large (DoS protection)", async () => {
79-
const hugSlug = "A".repeat(20000);
79+
const hugSlug = "A".repeat(2050);
8080
const response = await fetch(`${baseURL}/api/v2/invites/${hugSlug}`, {
8181
method: "GET",
8282
});
8383

84-
// Server rejects with 431 (Request Header Fields Too Large) before reaching handler
85-
expect(response.status).toBe(431);
84+
// Handler rejects with 413 (Payload Too Large) for slugs over 2048 chars
85+
expect(response.status).toBe(413);
8686
});
8787

8888
test("should return valid structure with null fields for valid old-format invite", async () => {

0 commit comments

Comments
 (0)