1
0
mirror of https://github.com/kataras/iris.git synced 2025-12-19 10:57:05 +00:00

fix all _examples to the newest mvc, add comments to those examples and add a package-level .Configure in order to make it easier for new users. Add a deprecated panic if app.Controller is used with a small tutorial and future resource link so they can re-write their mvc app's definitions

Former-commit-id: bf07696041be9e3d178ce3c42ccec2df4bfdb2af
This commit is contained in:
Gerasimos (Makis) Maropoulos
2017-12-20 08:33:53 +02:00
parent fd0f3ed6cb
commit b78698f6c0
20 changed files with 432 additions and 283 deletions

View File

@@ -264,9 +264,10 @@ func (t *testControllerViewResultRespectCtxViewData) Get() Result {
func TestControllerViewResultRespectCtxViewData(t *testing.T) {
app := iris.New()
NewEngine().Controller(app, new(testControllerViewResultRespectCtxViewData), func(b BeforeActivation) {
b.Dependencies().Add(t)
})
m := NewEngine()
m.Dependencies.Add(t)
m.Controller(app.Party("/"), new(testControllerViewResultRespectCtxViewData))
e := httptest.New(t, app)
e.GET("/").Expect().Status(iris.StatusInternalServerError)