diff --git a/fox_test.go b/fox_test.go index 3cbc57e1..c4c04fc5 100644 --- a/fox_test.go +++ b/fox_test.go @@ -3319,16 +3319,6 @@ func Test_iTree_deleteWildcard(t *testing.T) { assert.True(t, f.Has(MethodGet, "/foo/+{args}")) } -func TestIter_Methods(t *testing.T) { - f, _ := NewRouter() - for _, rte := range githubAPI { - require.NoError(t, onlyError(f.Add([]string{rte.method}, rte.path, emptyHandler))) - } - - methods := slices.Sorted(f.Iter().Methods()) - assert.Equal(t, []string{"DELETE", "GET", "POST", "PUT"}, methods) -} - func TestRouter_HandleNoRoute(t *testing.T) { called := 0 m := MiddlewareFunc(func(next HandlerFunc) HandlerFunc { diff --git a/iter_test.go b/iter_test.go index f5d3b521..a47dbc98 100644 --- a/iter_test.go +++ b/iter_test.go @@ -373,3 +373,13 @@ func ExampleIter_NamePrefix() { fmt.Println(slices.Collect(route.Methods()), route.Name()) } } + +func TestIter_Methods(t *testing.T) { + f, _ := NewRouter() + for _, rte := range githubAPI { + require.NoError(t, onlyError(f.Add([]string{rte.method}, rte.path, emptyHandler))) + } + + methods := slices.Sorted(f.Iter().Methods()) + assert.Equal(t, []string{"DELETE", "GET", "POST", "PUT"}, methods) +}