@@ -452,21 +452,38 @@ func SessionStoreInterfaceTests(in *testInput) {
454 Context("when Load is called", func() {
454 Context("when Load is called", func() {
455+ Context("with a valid session cookie in the request", func() {
455− BeforeEach(func() {
456+ BeforeEach(func() {
456− req := httptest.NewRequest("GET", "http://example.com/", nil)
457+ req := httptest.NewRequest("GET", "http://example.com/", nil)
457− resp := httptest.NewRecorder()
458+ resp := httptest.NewRecorder()
458− err := in.ss().Save(resp, req, in.session)
459+ err := in.ss().Save(resp, req, in.session)
459− Expect(err).ToNot(HaveOccurred())
460+ Expect(err).ToNot(HaveOccurred())
461+ for _, cookie := range resp.Result().Cookies() {
462+ in.request.AddCookie(cookie)
461− for _, cookie := range resp.Result().Cookies() {
466+ Context("before the refresh period", func() {
462− in.request.AddCookie(cookie)
467+ LoadSessionTests(in)
466− Context("before the refresh period", func() {
471+ Context("with no cookies in the request", func() {
467− LoadSessionTests(in)
472+ var loadedSession *sessionsapi.SessionState
476+ loadedSession, loadErr = in.ss().Load(in.request)
479+ It("returns an empty session", func() {
480+ Expect(loadedSession).To(BeNil())
483+ It("should return a no cookie error", func() {
484+ Expect(loadErr).To(MatchError(http.ErrNoCookie))