mirror of
https://github.com/kataras/iris.git
synced 2025-12-21 11:57:02 +00:00
add uint8 parameter type, and mvc and hero - this commit may be a point of tutorial on how to add a completely new type from scratch to the hero for future contributors
Former-commit-id: dc7a7e6c97ef0c644a22e92072e4bdb98ae10582
This commit is contained in:
@@ -366,7 +366,8 @@ func (c *testControllerRelPathFromFunc) EndRequest(ctx context.Context) {
|
||||
|
||||
func (c *testControllerRelPathFromFunc) Get() {}
|
||||
func (c *testControllerRelPathFromFunc) GetBy(uint64) {}
|
||||
func (c *testControllerRelPathFromFunc) GetRatioBy(int64) {}
|
||||
func (c *testControllerRelPathFromFunc) GetUint8RatioBy(uint8) {}
|
||||
func (c *testControllerRelPathFromFunc) GetUint64RatioBy(int64) {}
|
||||
func (c *testControllerRelPathFromFunc) GetAnythingByWildcard(string) {}
|
||||
|
||||
func (c *testControllerRelPathFromFunc) GetLogin() {}
|
||||
@@ -391,8 +392,11 @@ func TestControllerRelPathFromFunc(t *testing.T) {
|
||||
|
||||
e.GET("/18446744073709551615").Expect().Status(iris.StatusOK).
|
||||
Body().Equal("GET:/18446744073709551615")
|
||||
e.GET("/ratio/-42").Expect().Status(iris.StatusOK).
|
||||
Body().Equal("GET:/ratio/-42")
|
||||
e.GET("/uint8/ratio/255").Expect().Status(iris.StatusOK).
|
||||
Body().Equal("GET:/uint8/ratio/255")
|
||||
e.GET("/uint8/ratio/256").Expect().Status(iris.StatusNotFound)
|
||||
e.GET("/uint64/ratio/-42").Expect().Status(iris.StatusOK).
|
||||
Body().Equal("GET:/uint64/ratio/-42")
|
||||
e.GET("/something/true").Expect().Status(iris.StatusOK).
|
||||
Body().Equal("GET:/something/true")
|
||||
e.GET("/something/false").Expect().Status(iris.StatusOK).
|
||||
|
||||
Reference in New Issue
Block a user