Skip to content

Commit

Permalink
Closing 39
Browse files Browse the repository at this point in the history
Signed-off-by: Vishal Rana <vr@labstack.com>
  • Loading branch information
vishr committed Apr 27, 2015
1 parent 35680ab commit ff75c9c
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions echo_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -219,17 +219,17 @@ func TestEchoGroup(t *testing.T) {
t.Errorf("should execute middleware 3, executed %s", b.String())
}

// Nested Group
// Nested group
g3 := e.Group("/group3")
g4 := g3.Group("/group4")
g4.Get("/test", func(c *Context) {
c.String(http.StatusOK, "okay")
g4.Get("/home", func(c *Context) {
c.NoContent(http.StatusOK)
})
w = httptest.NewRecorder()
r, _ = http.NewRequest(GET, "/group3/group4/test", nil)
r, _ = http.NewRequest(GET, "/group3/group4/home", nil)
e.ServeHTTP(w, r)
if w.Body.String() != "okay" {
t.Error("body should be okay")
if w.Code != 200 {
t.Errorf("status code should be 200, found %d", w.Code)
}
}

Expand Down

0 comments on commit ff75c9c

Please sign in to comment.