1
0
mirror of https://github.com/kataras/iris.git synced 2025-12-17 18:07:01 +00:00
Former-commit-id: 4e30bf6a74acb7d463c7fcf1e9e08ca3147117a7
This commit is contained in:
Gerasimos (Makis) Maropoulos
2017-10-06 08:23:03 +03:00
parent 4fb78bbcd9
commit e5600fcf0d
18 changed files with 682 additions and 419 deletions

View File

@@ -446,18 +446,20 @@ func (c *testControllerRelPathFromFunc) EndRequest(ctx context.Context) {
c.Controller.EndRequest(ctx)
}
func (c *testControllerRelPathFromFunc) Get() {}
func (c *testControllerRelPathFromFunc) GetBy(int64) {}
func (c *testControllerRelPathFromFunc) GetByWildcard(string) {}
func (c *testControllerRelPathFromFunc) Get() {}
func (c *testControllerRelPathFromFunc) GetBy(int64) {}
func (c *testControllerRelPathFromFunc) GetAnythingByWildcard(string) {}
func (c *testControllerRelPathFromFunc) GetLogin() {}
func (c *testControllerRelPathFromFunc) PostLogin() {}
func (c *testControllerRelPathFromFunc) GetAdminLogin() {}
func (c *testControllerRelPathFromFunc) PutSomethingIntoThis() {}
func (c *testControllerRelPathFromFunc) PutSomethingIntoThis() {}
func (c *testControllerRelPathFromFunc) GetSomethingBy(bool) {}
func (c *testControllerRelPathFromFunc) GetSomethingByBy(string, int) {}
func (c *testControllerRelPathFromFunc) GetSomethingNewBy(string, int) {} // two input arguments, one By which is the latest word.
func (c *testControllerRelPathFromFunc) GetSomethingByElseThisBy(bool, int) {} // two input arguments
func TestControllerRelPathFromFunc(t *testing.T) {
@@ -478,6 +480,8 @@ func TestControllerRelPathFromFunc(t *testing.T) {
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/new/kataras/42").Expect().Status(httptest.StatusOK).
Body().Equal("GET:/something/new/kataras/42")
e.GET("/something/true/else/this/42").Expect().Status(httptest.StatusOK).
Body().Equal("GET:/something/true/else/this/42")