1
0
mirror of https://github.com/kataras/iris.git synced 2025-12-18 10:27:06 +00:00

fix #2158 and more

This commit is contained in:
Gerasimos (Makis) Maropoulos
2023-07-08 02:08:18 +03:00
parent 757e7fe61b
commit 6add1ba49b
79 changed files with 551 additions and 467 deletions

View File

@@ -11,14 +11,14 @@ func TestMVCOverlapping(t *testing.T) {
e := httptest.New(t, app, httptest.URL("http://example.com"))
// unauthenticated.
e.GET("/user").Expect().Status(httptest.StatusOK).Body().Equal("custom action to redirect on authentication page")
e.GET("/user").Expect().Status(httptest.StatusOK).Body().IsEqual("custom action to redirect on authentication page")
// login.
e.POST("/user/login").Expect().Status(httptest.StatusOK)
// authenticated.
e.GET("/user").Expect().Status(httptest.StatusOK).Body().Equal(`UserController.Get: The Authenticated type
e.GET("/user").Expect().Status(httptest.StatusOK).Body().IsEqual(`UserController.Get: The Authenticated type
can be used to secure a controller's method too.`)
// logout.
e.POST("/user/logout").Expect().Status(httptest.StatusOK)
// unauthenticated.
e.GET("/user").Expect().Status(httptest.StatusOK).Body().Equal("custom action to redirect on authentication page")
e.GET("/user").Expect().Status(httptest.StatusOK).Body().IsEqual("custom action to redirect on authentication page")
}