Restore global allow_unconfirmed_access_for after test

This commit is contained in:
Lucas Mazza
2014-09-08 17:38:06 -03:00
parent c25312e78e
commit 716d128e27

View File

@@ -224,10 +224,11 @@ class ConfirmableTest < ActiveSupport::TestCase
end
test 'should be active when we set allow_unconfirmed_access_for to nil' do
Devise.allow_unconfirmed_access_for = nil
user = create_user
user.confirmation_sent_at = Date.today
assert user.active_for_authentication?
swap Devise, allow_unconfirmed_access_for: nil do
user = create_user
user.confirmation_sent_at = Date.today
assert user.active_for_authentication?
end
end
test 'should not be active without confirmation' do