mirror of
https://github.com/heartcombo/devise.git
synced 2022-11-09 12:18:31 -05:00
Unit test for Lockable#unauthenticated_message not leaking account existence
This is another failing test for #1994, a unit test for Lockable. Lockable's #uanauthenticated_message should not return :locked if paranoid mode is on and instead should return the generic :invalid response.
This commit is contained in:
parent
f79bb31ee6
commit
00e8841e93
1 changed files with 10 additions and 0 deletions
|
@ -260,4 +260,14 @@ class LockableTest < ActiveSupport::TestCase
|
|||
end
|
||||
end
|
||||
end
|
||||
|
||||
test 'should not return a locked unauthenticated message if in paranoid mode' do
|
||||
swap Devise, :paranoid => :true do
|
||||
user = create_user
|
||||
user.failed_attempts = Devise.maximum_attempts + 1
|
||||
user.lock_access!
|
||||
|
||||
assert_equal :invalid, user.unauthenticated_message
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue