Skip to content

Commit ff75c9c

Browse files
committed
Closing 39
Signed-off-by: Vishal Rana <[email protected]>
1 parent 35680ab commit ff75c9c

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

echo_test.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -219,17 +219,17 @@ func TestEchoGroup(t *testing.T) {
219219
t.Errorf("should execute middleware 3, executed %s", b.String())
220220
}
221221

222-
// Nested Group
222+
// Nested group
223223
g3 := e.Group("/group3")
224224
g4 := g3.Group("/group4")
225-
g4.Get("/test", func(c *Context) {
226-
c.String(http.StatusOK, "okay")
225+
g4.Get("/home", func(c *Context) {
226+
c.NoContent(http.StatusOK)
227227
})
228228
w = httptest.NewRecorder()
229-
r, _ = http.NewRequest(GET, "/group3/group4/test", nil)
229+
r, _ = http.NewRequest(GET, "/group3/group4/home", nil)
230230
e.ServeHTTP(w, r)
231-
if w.Body.String() != "okay" {
232-
t.Error("body should be okay")
231+
if w.Code != 200 {
232+
t.Errorf("status code should be 200, found %d", w.Code)
233233
}
234234
}
235235

0 commit comments

Comments
 (0)