mirror of
https://github.com/kataras/iris.git
synced 2025-01-23 10:41:03 +01:00
18 lines
398 B
Go
18 lines
398 B
Go
package main
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/kataras/iris/v12/httptest"
|
|
)
|
|
|
|
func TestReadCustomViaUnmarshaler(t *testing.T) {
|
|
app := newApp()
|
|
e := httptest.New(t, app)
|
|
|
|
expectedResponse := `Received: main.config{Addr:"localhost:8080", ServerName:"Iris"}`
|
|
|
|
e.POST("/").WithText("addr: localhost:8080\nserverName: Iris").Expect().
|
|
Status(httptest.StatusOK).Body().IsEqual(expectedResponse)
|
|
}
|