mirror of
https://github.com/kataras/iris.git
synced 2025-12-17 18:07:01 +00:00
example: gRPC-compatible controller
as requested at: https://github.com/kataras/iris/issues/1449 Former-commit-id: a0af1a78bcfef85f297c5087c8cbb00124226036
This commit is contained in:
16
_examples/mvc/grpc-compatible/main_test.go
Normal file
16
_examples/mvc/grpc-compatible/main_test.go
Normal file
@@ -0,0 +1,16 @@
|
||||
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"})
|
||||
}
|
||||
Reference in New Issue
Block a user