1
0
Fork 0
mirror of https://github.com/heartcombo/devise.git synced 2022-11-09 12:18:31 -05:00

fixes timeoutable specs to cover sign_out_all_scopes false

This commit is contained in:
Marcus Mansur 2013-11-21 14:02:45 -02:00
parent bd83483ba6
commit b16899f7bf

View file

@ -35,14 +35,19 @@ class SessionTimeoutTest < ActionDispatch::IntegrationTest
assert warden.authenticated?(:user)
end
test 'time out user session after default limit time' do
user = sign_in_as_user
get expire_user_path(user)
assert_not_nil last_request_at
test 'time out user session after default limit time when sign_out_all_scopes is false' do
swap Devise, sign_out_all_scopes: false do
sign_in_as_admin
get users_path
assert_redirected_to users_path
assert_not warden.authenticated?(:user)
user = sign_in_as_user
get expire_user_path(user)
assert_not_nil last_request_at
get users_path
assert_redirected_to users_path
assert_not warden.authenticated?(:user)
assert warden.authenticated?(:admin)
end
end
test 'time out all sessions after default limit time when sign_out_all_scopes is true' do