-
Notifications
You must be signed in to change notification settings - Fork 12
Closed
Description
A request made to a route that has not been defined is returning a 405 instead of 404.
it('missing route should 404', function(done) {
app.get('/trailing-slash/', function*() {
this.status = 204
})
request(server)
.get('/trailing-slash')
.expect(404, done) // Error: expected 404 "Not Found", got 405 "Method Not Allowed"
});
If the case was that /trailing-slash
was defined but not for a GET
then a 405 would make sense.
Metadata
Metadata
Assignees
Labels
No labels