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

Swap the failure app during the test case properly.

This commit is contained in:
Lucas Mazza 2014-05-28 10:38:29 -03:00
parent 395b5c4237
commit 88efa6545f

View file

@ -72,12 +72,9 @@ class TestHelpersTest < ActionController::TestCase
end
test "respects custom failure app" do
begin
Devise.warden_config.failure_app = CustomFailureApp
swap Devise.warden_config, failure_app: CustomFailureApp do
get :index
assert_response 306
ensure
Devise.warden_config.failure_app = Devise::FailureApp
end
end