File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments