mirror of
https://github.com/heartcombo/devise.git
synced 2022-11-09 12:18:31 -05:00
Simplify test that verifies multiple warden blocks
This commit is contained in:
parent
916e1d8da9
commit
6129215afe
1 changed files with 5 additions and 9 deletions
|
@ -55,18 +55,14 @@ class DeviseTest < ActiveSupport::TestCase
|
|||
|
||||
test 'warden manager user configuration through multiple blocks' do
|
||||
Devise.yield_and_restore do
|
||||
first_executed = false
|
||||
second_executed = false
|
||||
Devise.warden do |config|
|
||||
first_executed = true
|
||||
end
|
||||
Devise.warden do |config|
|
||||
second_executed = true
|
||||
executed = 0
|
||||
|
||||
3.times do
|
||||
Devise.warden { |config| executed += 1 }
|
||||
end
|
||||
|
||||
Devise.configure_warden!
|
||||
assert first_executed
|
||||
assert second_executed
|
||||
assert_equal 3, executed
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue