Permalink
Browse files

r2809@asus: jeremy | 2005-07-04 19:29:19 -0700

 give CGI::Session options as strings, not symbols


git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1681 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information...
1 parent 5061954 commit 509bf538894531f4329810f0489446f200d60f12 @jeremy jeremy committed Jul 4, 2005
Showing with 4 additions and 6 deletions.
  1. +4 −6 actionpack/test/controller/active_record_store_test.rb
@@ -47,9 +47,8 @@ def test_basics
end
def test_reload_same_session
- session_id = @new_session.session_id
@new_session.update
- reloaded = CGI::Session.new(CGI.new, 'session_id' => session_id, 'database_manager' => CGI::Session::ActiveRecordStore)
+ reloaded = CGI::Session.new(CGI.new, 'session_id' => @new_session.session_id, 'database_manager' => CGI::Session::ActiveRecordStore)
assert_equal 'bar', reloaded['foo']
end
end
@@ -61,13 +60,13 @@ def session_class
end
def setup
- session_class.connection = CGI::Session::ActiveRecordStore::Session.connection
+ session_class.connection = CGI::Session::ActiveRecordStore::SqlBypass.connection
session_class.create_table!
ENV['REQUEST_METHOD'] = 'GET'
CGI::Session::ActiveRecordStore.session_class = session_class
- @new_session = CGI::Session.new(CGI.new, :database_manager => CGI::Session::ActiveRecordStore, :new_session => true)
+ @new_session = CGI::Session.new(CGI.new, 'database_manager' => CGI::Session::ActiveRecordStore, 'new_session' => true)
end
def teardown
@@ -86,9 +85,8 @@ def test_basics
end
def test_reload_same_session
- session_id = @new_session.session_id
@new_session.update
- reloaded = CGI::Session.new(CGI.new, 'session_id' => session_id, 'database_manager' => CGI::Session::ActiveRecordStore)
+ reloaded = CGI::Session.new(CGI.new, 'session_id' => @new_session.session_id, 'database_manager' => CGI::Session::ActiveRecordStore)
assert_equal 'bar', reloaded['foo']
end
end

0 comments on commit 509bf53

Please sign in to comment.