mirror of
https://github.com/heartcombo/devise.git
synced 2026-01-10 07:18:14 -05:00
User assert_includes/refute_includes minitest helpers
This commit is contained in:
@@ -326,8 +326,8 @@ class FailureTest < ActiveSupport::TestCase
|
||||
"warden" => stub_everything
|
||||
}
|
||||
call_failure(env)
|
||||
assert @response.third.body.include?('<h2>Log in</h2>')
|
||||
assert @response.third.body.include?('Invalid Email or password.')
|
||||
assert_includes @response.third.body, '<h2>Log in</h2>'
|
||||
assert_includes @response.third.body, 'Invalid Email or password.'
|
||||
end
|
||||
|
||||
test 'calls the original controller if not confirmed email' do
|
||||
@@ -337,8 +337,8 @@ class FailureTest < ActiveSupport::TestCase
|
||||
"warden" => stub_everything
|
||||
}
|
||||
call_failure(env)
|
||||
assert @response.third.body.include?('<h2>Log in</h2>')
|
||||
assert @response.third.body.include?('You have to confirm your email address before continuing.')
|
||||
assert_includes @response.third.body, '<h2>Log in</h2>'
|
||||
assert_includes @response.third.body, 'You have to confirm your email address before continuing.'
|
||||
end
|
||||
|
||||
test 'calls the original controller if inactive account' do
|
||||
@@ -348,8 +348,8 @@ class FailureTest < ActiveSupport::TestCase
|
||||
"warden" => stub_everything
|
||||
}
|
||||
call_failure(env)
|
||||
assert @response.third.body.include?('<h2>Log in</h2>')
|
||||
assert @response.third.body.include?('Your account is not activated yet.')
|
||||
assert_includes @response.third.body, '<h2>Log in</h2>'
|
||||
assert_includes @response.third.body, 'Your account is not activated yet.'
|
||||
end
|
||||
|
||||
if Rails.application.config.respond_to?(:relative_url_root)
|
||||
@@ -361,8 +361,8 @@ class FailureTest < ActiveSupport::TestCase
|
||||
"warden" => stub_everything
|
||||
}
|
||||
call_failure(env)
|
||||
assert @response.third.body.include?('<h2>Log in</h2>')
|
||||
assert @response.third.body.include?('Invalid Email or password.')
|
||||
assert_includes @response.third.body, '<h2>Log in</h2>'
|
||||
assert_includes @response.third.body, 'Invalid Email or password.'
|
||||
assert_equal '/sample', @request.env["SCRIPT_NAME"]
|
||||
assert_equal '/users/sign_in', @request.env["PATH_INFO"]
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user