1
0
mirror of https://github.com/kataras/iris.git synced 2025-12-21 11:57:02 +00:00

add Context.ReadParams method

This commit is contained in:
Gerasimos (Makis) Maropoulos
2020-08-31 20:30:01 +03:00
parent 2f51845138
commit 477f5e6f9b
7 changed files with 91 additions and 11 deletions

View File

@@ -0,0 +1,16 @@
package main
import (
"testing"
"github.com/kataras/iris/v12/httptest"
)
func TestReadParams(t *testing.T) {
app := newApp()
e := httptest.New(t, app)
expectedBody := `myParams: main.myParams{Name:"kataras", Age:27, Tail:[]string{"iris", "web", "framework"}}`
e.GET("/kataras/27/iris/web/framework").Expect().Status(httptest.StatusOK).Body().Equal(expectedBody)
}