1
0
mirror of https://github.com/kataras/iris.git synced 2025-12-18 10:27:06 +00:00

MVC: Add support for ByBy as requested https://github.com/kataras/iris/issues/751

Former-commit-id: 78c2453c56000c2268e11e68d7b530251e2beedd
This commit is contained in:
Gerasimos (Makis) Maropoulos
2017-09-22 15:16:24 +03:00
parent ff8f96d56d
commit ab8235d398
2 changed files with 18 additions and 6 deletions

View File

@@ -456,6 +456,7 @@ func (c *testControllerRelPathFromFunc) GetAdminLogin() {}
func (c *testControllerRelPathFromFunc) PutSomethingIntoThis() {}
func (c *testControllerRelPathFromFunc) GetSomethingBy(bool) {}
func (c *testControllerRelPathFromFunc) GetSomethingByBy(string, int) {}
func (c *testControllerRelPathFromFunc) GetSomethingByElseThisBy(bool, int) {} // two input arguments
func TestControllerRelPathFromFunc(t *testing.T) {
@@ -474,6 +475,8 @@ func TestControllerRelPathFromFunc(t *testing.T) {
Body().Equal("GET:/something/false")
e.GET("/something/truee").Expect().Status(httptest.StatusNotFound)
e.GET("/something/falsee").Expect().Status(httptest.StatusNotFound)
e.GET("/something/kataras/42").Expect().Status(httptest.StatusOK).
Body().Equal("GET:/something/kataras/42")
e.GET("/something/true/else/this/42").Expect().Status(httptest.StatusOK).
Body().Equal("GET:/something/true/else/this/42")