1
0
mirror of https://github.com/labstack/echo.git synced 2025-11-29 22:48:07 +02:00

Fixed router tests

Signed-off-by: Vishal Rana <vr@labstack.com>
This commit is contained in:
Vishal Rana
2015-05-30 15:38:02 -07:00
parent b9eec15c01
commit 6d4864ac4f
2 changed files with 5 additions and 2 deletions

View File

@@ -531,11 +531,13 @@ func TestRouterServeHTTP(t *testing.T) {
req, _ := http.NewRequest(GET, "/users", nil)
w := httptest.NewRecorder()
r.ServeHTTP(w, req)
assert.Equal(t, http.StatusOK, w.Code)
// Not found
req, _ = http.NewRequest(GET, "/files", nil)
w = httptest.NewRecorder()
r.ServeHTTP(w, req)
assert.Equal(t, http.StatusNotFound, w.Code)
}
func (n *node) printTree(pfx string, tail bool) {