Skip to content

Commit 38fddcb

Browse files
committed
add test cover
1 parent 1ba0efa commit 38fddcb

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

mux_test.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,15 @@ func Request(method, url string, body io.Reader) (*http.Response, error) {
1919
}
2020

2121
func TestMux(t *testing.T) {
22+
t.Run("Mux.Empty method", func(t *testing.T) {
23+
defer func() {
24+
if err := recover(); err == nil {
25+
t.Fatal("Should be panic")
26+
}
27+
}()
28+
mux := New()
29+
mux.Handler("", "/:type", http.NotFoundHandler())
30+
})
2231
t.Run("Mux.Handler", func(t *testing.T) {
2332
assert := assert.New(t)
2433

0 commit comments

Comments
 (0)