test: cover unknown API routes
This commit is contained in:
parent
ca38e1a30f
commit
21d3da5d20
1 changed files with 9 additions and 0 deletions
|
|
@ -36,4 +36,13 @@ describe("API endpoints", () => {
|
|||
},
|
||||
});
|
||||
});
|
||||
|
||||
it("returns 404 for an unknown endpoint", async () => {
|
||||
const response = await app.inject({
|
||||
method: "GET",
|
||||
url: "/does-not-exist",
|
||||
});
|
||||
|
||||
assert.equal(response.statusCode, 404);
|
||||
});
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue