Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modified http status codes, using constants provided by the http package #514

Merged
merged 1 commit into from Aug 27, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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