mirror of
https://github.com/kataras/iris.git
synced 2025-12-18 18:37:05 +00:00
❤️ awesome and unique features for end-developers are coming...
total refactor of the hero and mvc packages, see README#Next (it's not completed yet) Former-commit-id: b85ae99cbfe5965ba919c1e15cf4989e787982c0
This commit is contained in:
@@ -19,7 +19,7 @@ func TestPathParams(t *testing.T) {
|
||||
})
|
||||
|
||||
handlerWithOtherBetweenThem := h.Handler(func(firstname string, f func() string, lastname string) {
|
||||
got = f() + firstname + lastname
|
||||
got = firstname + lastname
|
||||
})
|
||||
|
||||
ctx := context.NewContext(nil)
|
||||
@@ -28,20 +28,20 @@ func TestPathParams(t *testing.T) {
|
||||
handler(ctx)
|
||||
expected := "GerasimosMaropoulos"
|
||||
if got != expected {
|
||||
t.Fatalf("expected the params 'firstname' + 'lastname' to be '%s' but got '%s'", expected, got)
|
||||
t.Fatalf("[0] expected the params 'firstname' + 'lastname' to be '%s' but got '%s'", expected, got)
|
||||
}
|
||||
|
||||
got = ""
|
||||
handlerWithOther(ctx)
|
||||
expected = "GerasimosMaropoulos"
|
||||
if got != expected {
|
||||
t.Fatalf("expected the params 'firstname' + 'lastname' to be '%s' but got '%s'", expected, got)
|
||||
t.Fatalf("[1] expected the params 'firstname' + 'lastname' to be '%s' but got '%s'", expected, got)
|
||||
}
|
||||
|
||||
got = ""
|
||||
handlerWithOtherBetweenThem(ctx)
|
||||
expected = "GerasimosMaropoulos"
|
||||
if got != expected {
|
||||
t.Fatalf("expected the params 'firstname' + 'lastname' to be '%s' but got '%s'", expected, got)
|
||||
t.Fatalf("[2] expected the params 'firstname' + 'lastname' to be '%s' but got '%s'", expected, got)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user