Skip to content

Commit ff149f9

Browse files
committed
Changes while testing and reviewing
1 parent cbb475b commit ff149f9

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

routes/__tests__/contentType.test.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,14 @@ describe("Content-Type validation middleware", () => {
6767
expect(response.statusCode).toBe(200)
6868
})
6969

70+
it("accepts application/ld+json with charset parameter", async () => {
71+
const response = await request(routeTester)
72+
.post("/api/create")
73+
.set("Content-Type", "application/ld+json; charset=utf-8")
74+
.send(JSON.stringify({ "@context": "http://example.org", test: "ld-charset" }))
75+
expect(response.statusCode).toBe(200)
76+
})
77+
7078
it("returns 415 for missing Content-Type header", async () => {
7179
const response = await request(routeTester)
7280
.post("/api/create")

0 commit comments

Comments
 (0)