diff --git a/HISTORY.md b/HISTORY.md index 357ec4e8..ec5a9bf0 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -58,6 +58,7 @@ editors worked before but I couldn't let some developers without support. - IMPROVEMENT: Now you're able to pass an `func(http.ResponseWriter, *http.Request, http.HandlerFunc)` third-party net/http middleware(Chain-of-responsibility pattern) using the `iris.ToHandler` wrapper func without any other custom boilerplate. - IMPROVEMENT: [Sessions manager](https://github.com/kataras/go-sessions) works even faster now. + * Change: `context.Session().GetAll()` returns an empty map instead of nil when session has no values. ## 6.1.2 -> 6.1.3 diff --git a/context_test.go b/context_test.go index 89170653..5efcee3e 100644 --- a/context_test.go +++ b/context_test.go @@ -532,7 +532,7 @@ func TestContextSessions(t *testing.T) { // test destroy which also clears first d := e.GET("/destroy").Expect().Status(iris.StatusOK) - d.JSON().Null() + d.JSON().Object().Empty() // This removed: d.Cookies().Empty(). Reason: // httpexpect counts the cookies setted or deleted at the response time, but cookie is not removed, to be really removed needs to SetExpire(now-1second) so, // test if the cookies removed on the next request, like the browser's behavior.