mirror of
https://github.com/kataras/iris.git
synced 2025-12-18 02:17:05 +00:00
split of the mvc and the new hero package is completed, now handlers with input and output binding feature is a different feature than the mvc, however the mvc controller's methods can use the hero dependency injection as before (v10+)
Former-commit-id: d67f5a5ed9033286bcc4c04f6be612823cba2a57
This commit is contained in:
@@ -69,7 +69,7 @@ func (c *testControllerMethodResult) GetThingWithTryDefaultBy(index int) Result
|
||||
|
||||
func TestControllerMethodResult(t *testing.T) {
|
||||
app := iris.New()
|
||||
NewEngine().Controller(app, new(testControllerMethodResult))
|
||||
New(app).Register(new(testControllerMethodResult))
|
||||
|
||||
e := httptest.New(t, app)
|
||||
|
||||
@@ -173,7 +173,7 @@ func (c *testControllerMethodResultTypes) GetCustomStructWithError() (s testCust
|
||||
|
||||
func TestControllerMethodResultTypes(t *testing.T) {
|
||||
app := iris.New()
|
||||
NewEngine().Controller(app, new(testControllerMethodResultTypes))
|
||||
New(app).Register(new(testControllerMethodResultTypes))
|
||||
|
||||
e := httptest.New(t, app)
|
||||
|
||||
@@ -261,9 +261,9 @@ func (t *testControllerViewResultRespectCtxViewData) Get() Result {
|
||||
|
||||
func TestControllerViewResultRespectCtxViewData(t *testing.T) {
|
||||
app := iris.New()
|
||||
m := NewEngine()
|
||||
m.Dependencies.Add(t)
|
||||
m.Controller(app.Party("/"), new(testControllerViewResultRespectCtxViewData))
|
||||
m := New(app.Party("/"))
|
||||
m.AddDependencies(t)
|
||||
m.Register(new(testControllerViewResultRespectCtxViewData))
|
||||
|
||||
e := httptest.New(t, app)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user