1
0
mirror of https://github.com/kataras/iris.git synced 2025-12-18 18:37:05 +00:00
Former-commit-id: da3ffd7b32daa12b17ad2863cb55e9d15ec9943a
This commit is contained in:
Gerasimos (Makis) Maropoulos
2019-07-30 18:02:02 +03:00
parent 04834484ff
commit 970279deb8
6 changed files with 21 additions and 6 deletions

View File

@@ -29,6 +29,7 @@ func TestRoutingBasic(t *testing.T) {
expectedIndexResponse = "Hello from /"
expectedHomeResponse = `Same as app.Handle("GET", "/", [...])`
expectedUpathResponse = ":string, :int, :uint, :alphabetical and :path in the same path pattern."
expectedUStringResponse = expectedUResponse("username", "string", "abcd123")
expectedUIntResponse = expectedUResponse("id", "int", "-1")
expectedUUintResponse = expectedUResponse("uid", "uint", "42")
@@ -56,6 +57,8 @@ func TestRoutingBasic(t *testing.T) {
e.GET("/home").Expect().Status(httptest.StatusOK).
Body().Equal(expectedHomeResponse)
e.GET("/u/some/path/here").Expect().Status(httptest.StatusOK).
Body().Equal(expectedUpathResponse)
e.GET("/u/abcd123").Expect().Status(httptest.StatusOK).
Body().Equal(expectedUStringResponse)
e.GET("/u/-1").Expect().Status(httptest.StatusOK).