mirror of
https://github.com/heartcombo/devise.git
synced 2026-04-28 03:00:29 -04:00
Do not trigger timeout on sign in related actions
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user