mirror of
https://github.com/kataras/iris.git
synced 2025-12-22 04:17:03 +00:00
Fix .Path(...)/.Url(...) and {{url ...}}/{{ urlpath ...} on httprouter Adaptor. https://github.com/kataras/iris/issues/606
Former-commit-id: f5cb496ee151a7a85361f6ed5eeb2a8231eb2fff
This commit is contained in:
@@ -121,7 +121,7 @@ type testNativeRoute struct {
|
||||
status int
|
||||
}
|
||||
|
||||
func TestRouterPolicyAdaptor(t *testing.T) {
|
||||
func TestNativeRouterPolicyAdaptor(t *testing.T) {
|
||||
expectedWrongMethodStatus := StatusNotFound
|
||||
app := New(Configuration{FireMethodNotAllowed: true})
|
||||
app.Adapt(newTestNativeRouter())
|
||||
@@ -166,9 +166,9 @@ func TestRouterPolicyAdaptor(t *testing.T) {
|
||||
}).ChangeName("profile")
|
||||
|
||||
e := httptest.New(app, t)
|
||||
expected := "/profile/?user_id=42&ref=iris-go&something=anything"
|
||||
expected := "/profile/?user_id=42&ref=iris-go&anything=something"
|
||||
|
||||
if got := app.Path("profile", "user_id", 42, "ref", "iris-go", "something", "anything"); got != expected {
|
||||
if got := app.Path("profile", "user_id", 42, "ref", "iris-go", "anything", "something"); got != expected {
|
||||
t.Fatalf("URLPath expected %s but got %s", expected, got)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user