Skip to content

Commit

Permalink
Add test for multiple calls to Name().
Browse files Browse the repository at this point in the history
Fixes #394
  • Loading branch information
kisielk committed Aug 7, 2018
1 parent 815b8c6 commit e48e440
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions mux_test.go
Expand Up @@ -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)
Expand Down

0 comments on commit e48e440

Please sign in to comment.