Skip to content

Commit

Permalink
r2809@asus: jeremy | 2005-07-04 19:29:19 -0700
Browse files Browse the repository at this point in the history
 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
jeremy committed Jul 4, 2005
1 parent 5061954 commit 509bf53
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions actionpack/test/controller/active_record_store_test.rb
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 509bf53

Please sign in to comment.