1
0
mirror of https://github.com/kataras/iris.git synced 2025-12-20 03:17:04 +00:00

new feature: versioned controllers

Former-commit-id: c797e23c78b1e74bbe9ba56673f3a98f17f5e2f7
This commit is contained in:
Gerasimos (Makis) Maropoulos
2020-06-19 20:58:24 +03:00
parent 3f98b39632
commit 311b560717
13 changed files with 217 additions and 32 deletions

View File

@@ -14,14 +14,14 @@ func TestSessionsEncodeDecode(t *testing.T) {
es := e.GET("/set").Expect()
es.Status(iris.StatusOK)
es.Cookies().NotEmpty()
es.Body().Equal("All ok session set to: iris")
es.Body().Equal("All ok session set to: iris [isNew=true]")
e.GET("/get").Expect().Status(iris.StatusOK).Body().Equal("The name on the /set was: iris")
// delete and re-get
e.GET("/delete").Expect().Status(iris.StatusOK)
e.GET("/get").Expect().Status(iris.StatusOK).Body().Equal("The name on the /set was: ")
// set, clear and re-get
e.GET("/set").Expect().Body().Equal("All ok session set to: iris")
e.GET("/set").Expect().Body().Equal("All ok session set to: iris [isNew=false]")
e.GET("/clear").Expect().Status(iris.StatusOK)
e.GET("/get").Expect().Status(iris.StatusOK).Body().Equal("The name on the /set was: ")
}