iris/_examples/mvc/grpc-compatible/main_test.go

17 lines
336 B
Go
Raw Normal View History

package main
import (
"testing"
"github.com/kataras/iris/v12/httptest"
)
func TestBindContextContext(t *testing.T) {
app := newApp()
e := httptest.New(t, app)
e.POST("/login").WithJSON(map[string]string{"username": "makis"}).Expect().
Status(httptest.StatusOK).
JSON().Equal(map[string]string{"message": "makis logged"})
}