Skip to content

Commit

Permalink
Modified http status codes, using constants provided by the http pack…
Browse files Browse the repository at this point in the history
…age (#514)
  • Loading branch information
vivekv96 authored and elithrar committed Aug 27, 2019
1 parent 9536e40 commit e1863a6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions mux_test.go
Expand Up @@ -2046,7 +2046,7 @@ func TestNoMatchMethodErrorHandler(t *testing.T) {

resp := NewRecorder()
r.ServeHTTP(resp, req)
if resp.Code != 405 {
if resp.Code != http.StatusMethodNotAllowed {
t.Errorf("Expecting code %v", 405)
}

Expand Down Expand Up @@ -2725,7 +2725,7 @@ func TestMethodNotAllowed(t *testing.T) {

router.ServeHTTP(w, req)

if w.Code != 405 {
if w.Code != http.StatusMethodNotAllowed {
t.Fatalf("Expected status code 405 (got %d)", w.Code)
}
}
Expand Down Expand Up @@ -2798,7 +2798,7 @@ func TestSubrouterNotFound(t *testing.T) {

router.ServeHTTP(w, req)

if w.Code != 404 {
if w.Code != http.StatusNotFound {
t.Fatalf("Expected status code 404 (got %d)", w.Code)
}
}
Expand Down

0 comments on commit e1863a6

Please sign in to comment.