test/spec_session_cookie.rb in rack-1.3.0 vs test/spec_session_cookie.rb in rack-1.3.1
- old
+ new
@@ -205,6 +205,12 @@
it "exposes :coder in env['rack.session.option']" do
app = Rack::Session::Cookie.new(session_option[:coder])
res = Rack::MockRequest.new(app).get("/")
res.body.should.match(/Base64::Marshal/)
end
+
+ it "allows passing in a hash with session data from middleware in front" do
+ app = Rack::Session::Cookie.new(session_id)
+ res = Rack::MockRequest.new(app).get("/", 'rack.session' => {:foo => 'bar'})
+ res.body.should.match(/foo/)
+ end
end