iris/_examples/mvc/grpc-compatible/main_test.go
Gerasimos (Makis) Maropoulos 09a410c6cb example: gRPC-compatible controller
as requested at: https://github.com/kataras/iris/issues/1449


Former-commit-id: a0af1a78bcfef85f297c5087c8cbb00124226036
2020-02-12 19:27:11 +02:00

17 lines
336 B
Go

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"})
}