From 413d0f2296837c9317aee17ff0a4c59b28579d22 Mon Sep 17 00:00:00 2001 From: Javier Provecho Fernandez Date: Sun, 4 Jan 2015 02:26:33 +0100 Subject: [PATCH] Fix TestRouteNotOK2 with HTTP 405 --- Godeps/Godeps.json | 2 +- gin_test.go | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/Godeps/Godeps.json b/Godeps/Godeps.json index d963b7ea..905a487f 100644 --- a/Godeps/Godeps.json +++ b/Godeps/Godeps.json @@ -4,7 +4,7 @@ "Deps": [ { "ImportPath": "github.com/julienschmidt/httprouter", - "Rev": "7deadb6844d2c6ff1dfb812eaa439b87cdaedf20" + "Rev": "90d58bada7e6154006f2728ee09053271154a8f6" } ] } diff --git a/gin_test.go b/gin_test.go index 1368aa08..ba74c159 100644 --- a/gin_test.go +++ b/gin_test.go @@ -108,9 +108,8 @@ func testRouteNotOK2(method string, t *testing.T) { if passed == true { t.Errorf(method + " route handler was invoked, when it should not") } - if w.Code != http.StatusNotFound { - // If this fails, it's because httprouter needs to be updated to at least f78f58a0db - t.Errorf("Status code should be %v, was %d. Location: %s", http.StatusNotFound, w.Code, w.HeaderMap.Get("Location")) + if w.Code != http.StatusMethodNotAllowed { + t.Errorf("Status code should be %v, was %d. Location: %s", http.StatusMethodNotAllowed, w.Code, w.HeaderMap.Get("Location")) } }