@@ -598,9 +598,9 @@ func TestEchoAutoHead(t *testing.T) {
598598 return c .String (http .StatusTeapot , "OK" )
599599 })
600600
601- assert .Equal (t , http .MethodHead , ri .Method )
601+ assert .Equal (t , http .MethodGet , ri .Method )
602602 assert .Equal (t , "/" , ri .Path )
603- assert .Equal (t , http .MethodHead + ":/" , ri .Name )
603+ assert .Equal (t , http .MethodGet + ":/" , ri .Name )
604604 assert .Nil (t , ri .Parameters )
605605
606606 status , body := request (http .MethodHead , "/" , e )
@@ -937,7 +937,7 @@ func TestEchoMethodNotAllowed(t *testing.T) {
937937 e .ServeHTTP (rec , req )
938938
939939 assert .Equal (t , http .StatusMethodNotAllowed , rec .Code )
940- assert .Equal (t , "OPTIONS, GET" , rec .Header ().Get (HeaderAllow ))
940+ assert .Equal (t , "OPTIONS, GET, HEAD " , rec .Header ().Get (HeaderAllow ))
941941}
942942
943943func TestEcho_OnAddRoute (t * testing.T ) {
@@ -978,6 +978,7 @@ func TestEcho_OnAddRoute(t *testing.T) {
978978 t .Run (tc .name , func (t * testing.T ) {
979979
980980 e := New ()
981+ e .AutoHeadCancel ()
981982
982983 added := make ([]string , 0 )
983984 cnt := 0
0 commit comments