From 84f61f6b05a61105386c662fe6962837e90c5e87 Mon Sep 17 00:00:00 2001 From: "Gerasimos (Makis) Maropoulos" Date: Tue, 7 Feb 2017 03:01:26 +0200 Subject: [PATCH] Look HISTORY.md for the 6.1.4 improvements. Fix sessions test expect a nil json instead of an empty. --- HISTORY.md | 1 + context_test.go | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) 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.