Browse Source

Add test for multiple calls to Name().

Fixes #394
pull/398/head
Kamil Kisiel 7 years ago
parent
commit
e48e440e4c
  1. 9
      mux_test.go

9
mux_test.go

@ -1323,6 +1323,15 @@ func TestNamedRoutes(t *testing.T) {
} }
} }
func TestNameMultipleCalls(t *testing.T) {
r1 := NewRouter()
rt := r1.NewRoute().Name("foo").Name("bar")
err := rt.GetError()
if err == nil {
t.Errorf("Expected an error")
}
}
func TestStrictSlash(t *testing.T) { func TestStrictSlash(t *testing.T) {
r := NewRouter() r := NewRouter()
r.StrictSlash(true) r.StrictSlash(true)

Loading…
Cancel
Save