mirror of
https://github.com/kataras/iris.git
synced 2025-12-17 18:07:01 +00:00
Replace controller's .Register with .Handle and AddDependencies with .Register in order to be aligned with the 'hero' package, all examples and docs are updated, it's crazy how I can't stop even on Christmas
Former-commit-id: 3b42963e9806e327ee42942cf156bda6059eaf8f
This commit is contained in:
@@ -69,7 +69,7 @@ func (c *testControllerMethodResult) GetThingWithTryDefaultBy(index int) Result
|
||||
|
||||
func TestControllerMethodResult(t *testing.T) {
|
||||
app := iris.New()
|
||||
New(app).Register(new(testControllerMethodResult))
|
||||
New(app).Handle(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()
|
||||
New(app).Register(new(testControllerMethodResultTypes))
|
||||
New(app).Handle(new(testControllerMethodResultTypes))
|
||||
|
||||
e := httptest.New(t, app)
|
||||
|
||||
@@ -262,8 +262,8 @@ func (t *testControllerViewResultRespectCtxViewData) Get() Result {
|
||||
func TestControllerViewResultRespectCtxViewData(t *testing.T) {
|
||||
app := iris.New()
|
||||
m := New(app.Party("/"))
|
||||
m.AddDependencies(t)
|
||||
m.Register(new(testControllerViewResultRespectCtxViewData))
|
||||
m.Register(t)
|
||||
m.Handle(new(testControllerViewResultRespectCtxViewData))
|
||||
|
||||
e := httptest.New(t, app)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user