mirror of
https://github.com/TracksApp/tracks.git
synced 2026-01-07 17:58:50 +01:00
fix stories_test to run again. Using ActiveRecordStore for session aparently did not work here
This commit is contained in:
parent
012a5929e1
commit
6443adac78
2 changed files with 5 additions and 4 deletions
|
|
@ -19,8 +19,9 @@ config.action_mailer.delivery_method = :test
|
|||
# Disable request forgery protection in test environment
|
||||
config.action_controller.allow_forgery_protection = false
|
||||
|
||||
# Unique cookies
|
||||
config.action_controller.session = { :key => 'TracksTest' }
|
||||
# Unique cookies and use cookies for session
|
||||
config.action_controller.session_store = :cookie_store
|
||||
config.action_controller.session = { :key => 'TracksTest', :secret => SITE_CONFIG['salt'] * (30.0 / SITE_CONFIG['salt'].length).ceil }
|
||||
|
||||
# Overwrite the default settings for fixtures in tests. See Fixtures
|
||||
# for more details about these settings.
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ class StoriesTest < ActionController::IntegrationTest
|
|||
attr_reader :user
|
||||
|
||||
def logs_in_as(user,plain_pass)
|
||||
@user = users(user)
|
||||
@user = user
|
||||
post "/login", :user_login => @user.login,
|
||||
:user_password => plain_pass,
|
||||
:user_noexpiry => 'n'
|
||||
|
|
@ -72,7 +72,7 @@ class StoriesTest < ActionController::IntegrationTest
|
|||
open_session do |sess|
|
||||
sess.extend(CustomAssertions)
|
||||
sess.goes_to_login
|
||||
sess.logs_in_as(user,plainpass)
|
||||
sess.logs_in_as(users(user),plainpass)
|
||||
yield sess if block_given?
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue