1
0
mirror of https://github.com/kataras/iris.git synced 2025-12-19 02:47:04 +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

@@ -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 [isNew=true]")
es.Body().IsEqual("All ok session set to: iris [isNew=true]")
e.GET("/get").Expect().Status(iris.StatusOK).Body().Equal("The username on the /set was: iris")
e.GET("/get").Expect().Status(iris.StatusOK).Body().IsEqual("The username 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 username on the /set was: ")
e.GET("/get").Expect().Status(iris.StatusOK).Body().IsEqual("The username on the /set was: ")
// set, clear and re-get
e.GET("/set").Expect().Body().Equal("All ok session set to: iris [isNew=false]")
e.GET("/set").Expect().Body().IsEqual("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 username on the /set was: ")
e.GET("/get").Expect().Status(iris.StatusOK).Body().IsEqual("The username on the /set was: ")
}