Do not trigger timeout on sign in related actions

This commit is contained in:
José Valim
2012-06-16 13:24:07 +02:00
parent 4def600076
commit 41a91188f5
5 changed files with 19 additions and 5 deletions

View File

@@ -25,7 +25,7 @@ class SessionTimeoutTest < ActionController::IntegrationTest
assert_equal old_last_request, last_request_at
end
test 'not time out user session before default limit time' do
test 'does not time out user session before default limit time' do
sign_in_as_user
assert_response :success
assert warden.authenticated?(:user)
@@ -53,12 +53,21 @@ class SessionTimeoutTest < ActionController::IntegrationTest
assert_response :redirect
assert_redirected_to root_path
follow_redirect!
assert_contain 'Signed out successfully'
end
test 'time out is not triggered on sign in' do
user = sign_in_as_user
get expire_user_path(user)
post "/users/sign_in", :email => user.email, :password => "123456"
assert_response :redirect
follow_redirect!
assert_contain 'You are signed in'
end
test 'user configured timeout limit' do
swap Devise, :timeout_in => 8.minutes do
user = sign_in_as_user