1
0
mirror of https://github.com/kataras/iris.git synced 2025-12-18 18:37:05 +00:00
Files
kararas_iris/_examples/request-body/read-url/main_test.go
Gerasimos (Makis) Maropoulos 7ab51805ba add an example for #1659
2020-10-18 19:37:33 +03:00

17 lines
405 B
Go

package main
import (
"testing"
"github.com/kataras/iris/v12/httptest"
)
func TestReadURL(t *testing.T) {
app := newApp()
e := httptest.New(t, app)
expectedBody := `myURL: main.myURL{Name:"kataras", Age:27, Tail:[]string{"iris", "web", "framework"}}`
e.GET("/iris/web/framework").WithQuery("name", "kataras").WithQuery("age", 27).Expect().Status(httptest.StatusOK).Body().Equal(expectedBody)
}