Skip to content

Commit

Permalink
test(coverage/lookup): no path match
Browse files Browse the repository at this point in the history
  • Loading branch information
tigerwill90 committed Feb 26, 2024
1 parent 67a06c2 commit a47f72a
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion fox_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1988,11 +1988,17 @@ func TestRouter_Lookup(t *testing.T) {
cc.Close()
}

// No method
// No method match
req := httptest.NewRequest("ANY", "/bar", nil)
handler, cc, _ := f.Lookup(mockResponseWriter{}, req)
assert.Nil(t, handler)
assert.Nil(t, cc)

// No path match
req = httptest.NewRequest(http.MethodGet, "/bar", nil)
handler, cc, _ = f.Lookup(mockResponseWriter{}, req)
assert.Nil(t, handler)
assert.Nil(t, cc)
}

func TestTree_Has(t *testing.T) {
Expand Down

0 comments on commit a47f72a

Please sign in to comment.