diff --git a/mux_test.go b/mux_test.go index af21329f..31c7d51d 100644 --- a/mux_test.go +++ b/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) { r := NewRouter() r.StrictSlash(true)