diff options
author | Joshua Peek <josh@joshpeek.com> | 2008-12-15 16:33:31 -0600 |
---|---|---|
committer | Joshua Peek <josh@joshpeek.com> | 2008-12-15 16:33:31 -0600 |
commit | ed708307137c811d14e5fd2cb4ea550add381a82 (patch) | |
tree | 31cb7df0a489bb4bbb0a9bc9edb24a70a869a0d1 /actionpack/test/controller/rack_test.rb | |
parent | e8c1915416579a3840573ca2c80822d96cb31823 (diff) | |
download | rails-ed708307137c811d14e5fd2cb4ea550add381a82.tar.gz rails-ed708307137c811d14e5fd2cb4ea550add381a82.tar.bz2 rails-ed708307137c811d14e5fd2cb4ea550add381a82.zip |
Switch to Rack based session stores.
Diffstat (limited to 'actionpack/test/controller/rack_test.rb')
-rw-r--r-- | actionpack/test/controller/rack_test.rb | 26 |
1 files changed, 2 insertions, 24 deletions
diff --git a/actionpack/test/controller/rack_test.rb b/actionpack/test/controller/rack_test.rb index 641ef9626e..e2ec686c41 100644 --- a/actionpack/test/controller/rack_test.rb +++ b/actionpack/test/controller/rack_test.rb @@ -229,7 +229,7 @@ end class RackResponseTest < BaseRackTest def setup super - @response = ActionController::RackResponse.new(@request) + @response = ActionController::RackResponse.new end def test_simple_output @@ -265,34 +265,12 @@ class RackResponseTest < BaseRackTest body.each { |part| parts << part } assert_equal ["0", "1", "2", "3", "4"], parts end - - def test_set_session_cookie - cookie = CGI::Cookie.new({"name" => "name", "value" => "Josh"}) - @request.cgi.send :instance_variable_set, '@output_cookies', [cookie] - - @response.body = "Hello, World!" - @response.prepare! - - status, headers, body = @response.out - assert_equal "200 OK", status - assert_equal({ - "Content-Type" => "text/html; charset=utf-8", - "Cache-Control" => "private, max-age=0, must-revalidate", - "ETag" => '"65a8e27d8879283831b664bd8b7f0ad4"', - "Set-Cookie" => ["name=Josh; path="], - "Content-Length" => "13" - }, headers) - - parts = [] - body.each { |part| parts << part } - assert_equal ["Hello, World!"], parts - end end class RackResponseHeadersTest < BaseRackTest def setup super - @response = ActionController::RackResponse.new(@request) + @response = ActionController::RackResponse.new @response.headers['Status'] = "200 OK" end |