mirror of
https://github.com/kataras/iris.git
synced 2025-12-19 10:57:05 +00:00
fix #2158 and more
This commit is contained in:
@@ -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: ")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user