diff --git a/test/controllers/custom_strategy_test.rb b/test/controllers/custom_strategy_test.rb index c39ac3e6..d352a15b 100644 --- a/test/controllers/custom_strategy_test.rb +++ b/test/controllers/custom_strategy_test.rb @@ -42,9 +42,7 @@ class CustomStrategyTest < Devise::ControllerTestCase test "custom strategy can return its own status code" do ret = get :new - # check the returned rack array - # assert ret.is_a?(Array) - # assert_equal 400, ret.first + # check the returned response assert ret.is_a?(ActionDispatch::TestResponse) # check the saved response as well. This is purely so that the response is available to the testing framework @@ -55,12 +53,10 @@ class CustomStrategyTest < Devise::ControllerTestCase test "custom strategy can return custom headers" do ret = get :new - # check the returned rack array - # assert ret.is_a?(Array) - # assert_equal ret.third['X-FOO'], 'BAR' + # check the returned response assert ret.is_a?(ActionDispatch::TestResponse) # check the saved response headers as well. - assert_equal response.headers['X-FOO'], 'BAR' + assert_equal 'BAR', response.headers['X-FOO'] end end diff --git a/test/failure_app_test.rb b/test/failure_app_test.rb index af622fff..dc2a5bbc 100644 --- a/test/failure_app_test.rb +++ b/test/failure_app_test.rb @@ -363,8 +363,8 @@ class FailureTest < ActiveSupport::TestCase call_failure(env) assert @response.third.body.include?('

Log in

') assert @response.third.body.include?('Invalid Email or password.') - assert_equal @request.env["SCRIPT_NAME"], '/sample' - assert_equal @request.env["PATH_INFO"], '/users/sign_in' + assert_equal '/sample', @request.env["SCRIPT_NAME"] + assert_equal '/users/sign_in', @request.env["PATH_INFO"] end end end @@ -372,7 +372,7 @@ class FailureTest < ActiveSupport::TestCase context "Lazy loading" do test "loads" do - assert_equal Devise::FailureApp.new.lazy_loading_works?, "yes it does" + assert_equal "yes it does", Devise::FailureApp.new.lazy_loading_works? end end context "Without Flash Support" do diff --git a/test/integration/authenticatable_test.rb b/test/integration/authenticatable_test.rb index 6ffd4637..40c79cca 100644 --- a/test/integration/authenticatable_test.rb +++ b/test/integration/authenticatable_test.rb @@ -321,14 +321,14 @@ class AuthenticationRedirectTest < Devise::IntegrationTest test 'require_no_authentication should set the already_authenticated flash message' do sign_in_as_user visit new_user_session_path - assert_equal flash[:alert], I18n.t("devise.failure.already_authenticated") + assert_equal I18n.t("devise.failure.already_authenticated"), flash[:alert] end test 'require_no_authentication should set the already_authenticated flash message as admin' do store_translations :en, devise: { failure: { admin: { already_authenticated: 'You are already signed in as admin.' } } } do sign_in_as_admin visit new_admin_session_path - assert_equal flash[:alert], "You are already signed in as admin." + assert_equal "You are already signed in as admin.", flash[:alert] end end end diff --git a/test/integration/confirmable_test.rb b/test/integration/confirmable_test.rb index 5cafacb4..4886a6b5 100644 --- a/test/integration/confirmable_test.rb +++ b/test/integration/confirmable_test.rb @@ -218,7 +218,7 @@ class ConfirmationTest < Devise::IntegrationTest user = create_user(confirm: false) post user_confirmation_path(format: 'xml'), params: { user: { email: user.email } } assert_response :success - assert_equal response.body, {}.to_xml + assert_equal({}.to_xml, response.body) end test 'resent confirmation token with invalid E-Mail in XML format should return invalid response' do @@ -247,7 +247,7 @@ class ConfirmationTest < Devise::IntegrationTest post user_confirmation_path, params: { user: { email: user.email }, format: :json } assert_response :success - assert_equal response.body, {}.to_json + assert_equal({}.to_json, response.body) end test "when in paranoid mode and with a valid e-mail, should not say that the e-mail is valid" do diff --git a/test/integration/lockable_test.rb b/test/integration/lockable_test.rb index 87e439ef..ca72befd 100644 --- a/test/integration/lockable_test.rb +++ b/test/integration/lockable_test.rb @@ -136,8 +136,7 @@ class LockTest < Devise::IntegrationTest post user_unlock_path(format: 'xml'), params: { user: {email: user.email} } assert_response :success - assert_equal response.body, {}.to_xml - + assert_equal({}.to_xml, response.body) assert_equal 1, ActionMailer::Base.deliveries.size end @@ -160,7 +159,6 @@ class LockTest < Devise::IntegrationTest assert response.body.include? %(\n) end - test 'user with invalid unlock token should not be able to unlock the account via XML request' do get user_unlock_path(format: 'xml', unlock_token: 'invalid_token') assert_response :unprocessable_entity @@ -171,7 +169,7 @@ class LockTest < Devise::IntegrationTest user = create_user(locked: true) post user_unlock_path(format: "json", user: {email: user.email}) assert_response :success - assert_equal response.body, {}.to_json + assert_equal({}.to_json, response.body) end test "in paranoid mode, when trying to unlock a user that exists it should not say that it exists if it is locked" do diff --git a/test/integration/recoverable_test.rb b/test/integration/recoverable_test.rb index b1cdb657..c6f8c6cf 100644 --- a/test/integration/recoverable_test.rb +++ b/test/integration/recoverable_test.rb @@ -265,7 +265,7 @@ class PasswordTest < Devise::IntegrationTest create_user post user_password_path(format: 'xml'), params: { user: {email: "user@test.com"} } assert_response :success - assert_equal response.body, { }.to_xml + assert_equal({}.to_xml, response.body) end test 'reset password request with invalid E-Mail in XML format should return valid response' do @@ -280,7 +280,7 @@ class PasswordTest < Devise::IntegrationTest create_user post user_password_path(format: 'xml'), params: { user: {email: "invalid@test.com"} } assert_response :success - assert_equal response.body, { }.to_xml + assert_equal({}.to_xml, response.body) end end @@ -317,7 +317,7 @@ class PasswordTest < Devise::IntegrationTest post user_password_path(format: :json), params: { user: { email: user.email } } assert_response :success - assert_equal response.body, "{}" + assert_equal "{}", response.body end test "when in paranoid mode and with an invalid e-mail, asking to reset a password should display a message that does not indicates that the e-mail does not exists in the database" do diff --git a/test/integration/registerable_test.rb b/test/integration/registerable_test.rb index 46f09f37..dfe4b48e 100644 --- a/test/integration/registerable_test.rb +++ b/test/integration/registerable_test.rb @@ -20,7 +20,7 @@ class RegistrationTest < Devise::IntegrationTest assert_current_url "/admin_area/home" admin = Admin.to_adapter.find_first(order: [:id, :desc]) - assert_equal admin.email, 'new_user@test.com' + assert_equal 'new_user@test.com', admin.email end test 'a guest admin should be able to sign in and be redirected to a custom location' do @@ -69,7 +69,7 @@ class RegistrationTest < Devise::IntegrationTest refute warden.authenticated?(:user) user = User.to_adapter.find_first(order: [:id, :desc]) - assert_equal user.email, 'new_user@test.com' + assert_equal 'new_user@test.com', user.email refute user.confirmed? end @@ -254,7 +254,7 @@ class RegistrationTest < Devise::IntegrationTest assert_contain "Password confirmation doesn't match Password" refute User.to_adapter.find_first.valid_password?('pas123') end - + test 'a signed in user should see a warning about minimum password length' do sign_in_as_user get edit_user_registration_path @@ -303,7 +303,7 @@ class RegistrationTest < Devise::IntegrationTest assert response.body.include? %(\n) admin = Admin.to_adapter.find_first(order: [:id, :desc]) - assert_equal admin.email, 'new_user@test.com' + assert_equal 'new_user@test.com', admin.email end test 'a user sign up with valid information in XML format should return valid response' do @@ -312,7 +312,7 @@ class RegistrationTest < Devise::IntegrationTest assert response.body.include? %(\n) user = User.to_adapter.find_first(order: [:id, :desc]) - assert_equal user.email, 'new_user@test.com' + assert_equal 'new_user@test.com', user.email end test 'a user sign up with invalid information in XML format should return invalid response' do @@ -325,21 +325,21 @@ class RegistrationTest < Devise::IntegrationTest user = sign_in_as_user put user_registration_path(format: 'xml'), params: { user: { current_password: '12345678', email: 'user.new@test.com' } } assert_response :success - assert_equal user.reload.email, 'user.new@test.com' + assert_equal 'user.new@test.com', user.reload.email end test 'a user update information with invalid data in XML format should return invalid response' do user = sign_in_as_user put user_registration_path(format: 'xml'), params: { user: { current_password: 'invalid', email: 'user.new@test.com' } } assert_response :unprocessable_entity - assert_equal user.reload.email, 'user@test.com' + assert_equal 'user@test.com', user.reload.email end test 'a user cancel their account in XML format should return valid response' do sign_in_as_user delete user_registration_path(format: 'xml') assert_response :success - assert_equal User.to_adapter.find_all.size, 0 + assert_equal 0, User.to_adapter.find_all.size end end diff --git a/test/mailers/confirmation_instructions_test.rb b/test/mailers/confirmation_instructions_test.rb index 358b092c..8f9dbc15 100644 --- a/test/mailers/confirmation_instructions_test.rb +++ b/test/mailers/confirmation_instructions_test.rb @@ -88,7 +88,7 @@ class ConfirmationInstructionsTest < ActionMailer::TestCase host, port = ActionMailer::Base.default_url_options.values_at :host, :port if mail.body.encoded =~ %r{} - assert_equal $1, user.confirmation_token + assert_equal user.confirmation_token, $1 else flunk "expected confirmation url regex to match" end diff --git a/test/mailers/reset_password_instructions_test.rb b/test/mailers/reset_password_instructions_test.rb index f38829dd..1a371b72 100644 --- a/test/mailers/reset_password_instructions_test.rb +++ b/test/mailers/reset_password_instructions_test.rb @@ -84,7 +84,7 @@ class ResetPasswordInstructionsTest < ActionMailer::TestCase host, port = ActionMailer::Base.default_url_options.values_at :host, :port if mail.body.encoded =~ %r{} - assert_equal Devise.token_generator.digest(user.class, :reset_password_token, $1), user.reset_password_token + assert_equal user.reset_password_token, Devise.token_generator.digest(user.class, :reset_password_token, $1) else flunk "expected reset password url regex to match" end diff --git a/test/mailers/unlock_instructions_test.rb b/test/mailers/unlock_instructions_test.rb index 586799da..3722cf9c 100644 --- a/test/mailers/unlock_instructions_test.rb +++ b/test/mailers/unlock_instructions_test.rb @@ -85,7 +85,7 @@ class UnlockInstructionsTest < ActionMailer::TestCase host, port = ActionMailer::Base.default_url_options.values_at :host, :port if mail.body.encoded =~ %r{} - assert_equal Devise.token_generator.digest(user.class, :unlock_token, $1), user.unlock_token + assert_equal user.unlock_token, Devise.token_generator.digest(user.class, :unlock_token, $1) else flunk "expected unlock url regex to match" end diff --git a/test/models/authenticatable_test.rb b/test/models/authenticatable_test.rb index 4fc30a81..576ceaff 100644 --- a/test/models/authenticatable_test.rb +++ b/test/models/authenticatable_test.rb @@ -4,12 +4,12 @@ require 'test_helper' class AuthenticatableTest < ActiveSupport::TestCase test 'required_fields should be an empty array' do - assert_equal Devise::Models::Validatable.required_fields(User), [] + assert_equal [], Devise::Models::Validatable.required_fields(User) end test 'find_first_by_auth_conditions allows custom filtering parameters' do user = User.create!(email: "example@example.com", password: "1234567") - assert_equal User.find_first_by_auth_conditions({ email: "example@example.com" }), user + assert_equal user, User.find_first_by_auth_conditions({ email: "example@example.com" }) assert_nil User.find_first_by_auth_conditions({ email: "example@example.com" }, id: user.id.to_s.next) end @@ -18,14 +18,14 @@ class AuthenticatableTest < ActiveSupport::TestCase # config.strip_whitespace_keys = [:email] test 'find_or_initialize_with_errors uses parameter filter on find' do user = User.create!(email: "example@example.com", password: "1234567") - assert_equal User.find_or_initialize_with_errors([:email], { email: " EXAMPLE@example.com " }), user + assert_equal user, User.find_or_initialize_with_errors([:email], { email: " EXAMPLE@example.com " }) end # assumes default configuration of # config.case_insensitive_keys = [:email] # config.strip_whitespace_keys = [:email] test 'find_or_initialize_with_errors uses parameter filter on initialize' do - assert_equal User.find_or_initialize_with_errors([:email], { email: " EXAMPLE@example.com " }).email, "example@example.com" + assert_equal "example@example.com", User.find_or_initialize_with_errors([:email], { email: " EXAMPLE@example.com " }).email end test 'find_or_initialize_with_errors adds blank error' do diff --git a/test/models/confirmable_test.rb b/test/models/confirmable_test.rb index 899c9cab..d6f26c2b 100644 --- a/test/models/confirmable_test.rb +++ b/test/models/confirmable_test.rb @@ -61,7 +61,7 @@ class ConfirmableTest < ActiveSupport::TestCase user = create_user raw = user.raw_confirmation_token confirmed_user = User.confirm_by_token(raw) - assert_equal confirmed_user, user + assert_equal user, confirmed_user assert user.reload.confirmed? end @@ -160,7 +160,7 @@ class ConfirmableTest < ActiveSupport::TestCase test 'should find a user to send confirmation instructions' do user = create_user confirmation_user = User.send_confirmation_instructions(email: user.email) - assert_equal confirmation_user, user + assert_equal user, confirmation_user end test 'should return a new user if no email was found' do @@ -305,7 +305,7 @@ class ConfirmableTest < ActiveSupport::TestCase swap Devise, authentication_keys: [:username, :email] do user = create_user confirm_user = User.send_confirmation_instructions(email: user.email, username: user.username) - assert_equal confirm_user, user + assert_equal user, confirm_user end end @@ -322,7 +322,7 @@ class ConfirmableTest < ActiveSupport::TestCase user = create_user user.update_attribute(:confirmation_sent_at, confirmation_sent_at) confirmed_user = User.confirm_by_token(user.raw_confirmation_token) - assert_equal confirmed_user, user + assert_equal user, confirmed_user user.reload.confirmed? end @@ -497,7 +497,7 @@ class ReconfirmableTest < ActiveSupport::TestCase assert admin.confirm assert admin.update(email: 'new_test@example.com') confirmation_admin = Admin.send_confirmation_instructions(email: admin.unconfirmed_email) - assert_equal confirmation_admin, admin + assert_equal admin, confirmation_admin end test 'should return a new admin if no email or unconfirmed_email was found' do @@ -520,20 +520,20 @@ class ReconfirmableTest < ActiveSupport::TestCase end test 'required_fields should contain the fields that Devise uses' do - assert_equal Devise::Models::Confirmable.required_fields(User), [ + assert_equal [ :confirmation_token, :confirmed_at, :confirmation_sent_at - ] + ], Devise::Models::Confirmable.required_fields(User) end test 'required_fields should also contain unconfirmable when reconfirmable_email is true' do - assert_equal Devise::Models::Confirmable.required_fields(Admin), [ + assert_equal [ :confirmation_token, :confirmed_at, :confirmation_sent_at, :unconfirmed_email - ] + ], Devise::Models::Confirmable.required_fields(Admin) end test 'should not require reconfirmation after creating a record' do diff --git a/test/models/database_authenticatable_test.rb b/test/models/database_authenticatable_test.rb index 6eb6a052..676b44d2 100644 --- a/test/models/database_authenticatable_test.rb +++ b/test/models/database_authenticatable_test.rb @@ -108,7 +108,7 @@ class DatabaseAuthenticatableTest < ActiveSupport::TestCase test 'should support custom hashing methods' do user = UserWithCustomHashing.new(password: '654321') - assert_equal user.encrypted_password, '123456' + assert_equal '123456', user.encrypted_password end test 'allow authenticatable_salt to work even with nil hashed password' do @@ -293,18 +293,18 @@ class DatabaseAuthenticatableTest < ActiveSupport::TestCase end test 'required_fields should be encryptable_password and the email field by default' do - assert_equal Devise::Models::DatabaseAuthenticatable.required_fields(User), [ + assert_equal [ :encrypted_password, :email - ] + ], Devise::Models::DatabaseAuthenticatable.required_fields(User) end test 'required_fields should be encryptable_password and the login when the login is on authentication_keys' do swap Devise, authentication_keys: [:login] do - assert_equal Devise::Models::DatabaseAuthenticatable.required_fields(User), [ + assert_equal [ :encrypted_password, :login - ] + ], Devise::Models::DatabaseAuthenticatable.required_fields(User) end end end diff --git a/test/models/lockable_test.rb b/test/models/lockable_test.rb index 644156a4..c1844160 100644 --- a/test/models/lockable_test.rb +++ b/test/models/lockable_test.rb @@ -174,7 +174,7 @@ class LockableTest < ActiveSupport::TestCase user = create_user raw = user.send_unlock_instructions locked_user = User.unlock_access_by_token(raw) - assert_equal locked_user, user + assert_equal user, locked_user refute user.reload.access_locked? end @@ -194,7 +194,7 @@ class LockableTest < ActiveSupport::TestCase user = create_user user.lock_access! unlock_user = User.send_unlock_instructions(email: user.email) - assert_equal unlock_user, user + assert_equal user, unlock_user end test 'should return a new user if no email was found' do @@ -211,7 +211,7 @@ class LockableTest < ActiveSupport::TestCase swap Devise, authentication_keys: [:username, :email] do user = create_user unlock_user = User.send_unlock_instructions(email: user.email, username: user.username) - assert_equal unlock_user, user + assert_equal user, unlock_user end end @@ -270,11 +270,11 @@ class LockableTest < ActiveSupport::TestCase test 'required_fields should contain the all the fields when all the strategies are enabled' do swap Devise, unlock_strategy: :both do swap Devise, lock_strategy: :failed_attempts do - assert_equal Devise::Models::Lockable.required_fields(User), [ - :failed_attempts, - :locked_at, - :unlock_token - ] + assert_equal [ + :failed_attempts, + :locked_at, + :unlock_token + ], Devise::Models::Lockable.required_fields(User) end end end @@ -282,10 +282,10 @@ class LockableTest < ActiveSupport::TestCase test 'required_fields should contain only failed_attempts and locked_at when the strategies are time and failed_attempts are enabled' do swap Devise, unlock_strategy: :time do swap Devise, lock_strategy: :failed_attempts do - assert_equal Devise::Models::Lockable.required_fields(User), [ - :failed_attempts, - :locked_at - ] + assert_equal [ + :failed_attempts, + :locked_at + ], Devise::Models::Lockable.required_fields(User) end end end @@ -293,10 +293,10 @@ class LockableTest < ActiveSupport::TestCase test 'required_fields should contain only failed_attempts and unlock_token when the strategies are token and failed_attempts are enabled' do swap Devise, unlock_strategy: :email do swap Devise, lock_strategy: :failed_attempts do - assert_equal Devise::Models::Lockable.required_fields(User), [ - :failed_attempts, - :unlock_token - ] + assert_equal [ + :failed_attempts, + :unlock_token + ], Devise::Models::Lockable.required_fields(User) end end end diff --git a/test/models/omniauthable_test.rb b/test/models/omniauthable_test.rb index c22bc430..22cea976 100644 --- a/test/models/omniauthable_test.rb +++ b/test/models/omniauthable_test.rb @@ -4,6 +4,6 @@ require 'test_helper' class OmniauthableTest < ActiveSupport::TestCase test 'required_fields should contain the fields that Devise uses' do - assert_equal Devise::Models::Omniauthable.required_fields(User), [] + assert_equal [], Devise::Models::Omniauthable.required_fields(User) end end diff --git a/test/models/recoverable_test.rb b/test/models/recoverable_test.rb index ab47f95f..69f14a9b 100644 --- a/test/models/recoverable_test.rb +++ b/test/models/recoverable_test.rb @@ -116,7 +116,7 @@ class RecoverableTest < ActiveSupport::TestCase test 'should find a user to send instructions by email' do user = create_user reset_password_user = User.send_reset_password_instructions(email: user.email) - assert_equal reset_password_user, user + assert_equal user, reset_password_user end test 'should return a new record with errors if user was not found by e-mail' do @@ -129,7 +129,7 @@ class RecoverableTest < ActiveSupport::TestCase swap Devise, authentication_keys: [:username, :email] do user = create_user reset_password_user = User.send_reset_password_instructions(email: user.email, username: user.username) - assert_equal reset_password_user, user + assert_equal user, reset_password_user end end @@ -161,7 +161,7 @@ class RecoverableTest < ActiveSupport::TestCase raw = user.send_reset_password_instructions reset_password_user = User.reset_password_by_token(reset_password_token: raw) - assert_equal reset_password_user, user + assert_equal user, reset_password_user end test 'should return a new record with errors if no reset_password_token is found' do @@ -237,23 +237,23 @@ class RecoverableTest < ActiveSupport::TestCase end test 'required_fields should contain the fields that Devise uses' do - assert_equal Devise::Models::Recoverable.required_fields(User), [ + assert_equal [ :reset_password_sent_at, :reset_password_token - ] + ], Devise::Models::Recoverable.required_fields(User) end test 'should return a user based on the raw token' do user = create_user raw = user.send_reset_password_instructions - assert_equal User.with_reset_password_token(raw), user + assert_equal user, User.with_reset_password_token(raw) end test 'should return the same reset password token as generated' do user = create_user raw = user.send_reset_password_instructions - assert_equal Devise.token_generator.digest(self.class, :reset_password_token, raw), user.reset_password_token + assert_equal user.reset_password_token, Devise.token_generator.digest(self.class, :reset_password_token, raw) end test 'should return nil if a user based on the raw token is not found' do diff --git a/test/models/registerable_test.rb b/test/models/registerable_test.rb index 25493416..df5cf6fc 100644 --- a/test/models/registerable_test.rb +++ b/test/models/registerable_test.rb @@ -4,6 +4,6 @@ require 'test_helper' class RegisterableTest < ActiveSupport::TestCase test 'required_fields should contain the fields that Devise uses' do - assert_equal Devise::Models::Registerable.required_fields(User), [] + assert_equal [], Devise::Models::Registerable.required_fields(User) end end diff --git a/test/models/rememberable_test.rb b/test/models/rememberable_test.rb index 24ebb3fe..076a18a2 100644 --- a/test/models/rememberable_test.rb +++ b/test/models/rememberable_test.rb @@ -177,8 +177,8 @@ class RememberableTest < ActiveSupport::TestCase end test 'should have the required_fields array' do - assert_equal Devise::Models::Rememberable.required_fields(User), [ + assert_equal [ :remember_created_at - ] + ], Devise::Models::Rememberable.required_fields(User) end end diff --git a/test/models/timeoutable_test.rb b/test/models/timeoutable_test.rb index 205c8023..6bbb2960 100644 --- a/test/models/timeoutable_test.rb +++ b/test/models/timeoutable_test.rb @@ -43,7 +43,7 @@ class TimeoutableTest < ActiveSupport::TestCase end test 'required_fields should contain the fields that Devise uses' do - assert_equal Devise::Models::Timeoutable.required_fields(User), [] + assert_equal [], Devise::Models::Timeoutable.required_fields(User) end test 'should not raise error if remember_created_at is not empty and rememberable is disabled' do diff --git a/test/models/trackable_test.rb b/test/models/trackable_test.rb index d89df42d..250ca1d4 100644 --- a/test/models/trackable_test.rb +++ b/test/models/trackable_test.rb @@ -4,13 +4,13 @@ require 'test_helper' class TrackableTest < ActiveSupport::TestCase test 'required_fields should contain the fields that Devise uses' do - assert_equal Devise::Models::Trackable.required_fields(User), [ + assert_equal [ :current_sign_in_at, :current_sign_in_ip, :last_sign_in_at, :last_sign_in_ip, :sign_in_count - ] + ], Devise::Models::Trackable.required_fields(User) end test 'update_tracked_fields should only set attributes but not save the record' do diff --git a/test/models/validatable_test.rb b/test/models/validatable_test.rb index 6e02ad44..f96cfa91 100644 --- a/test/models/validatable_test.rb +++ b/test/models/validatable_test.rb @@ -116,6 +116,6 @@ class ValidatableTest < ActiveSupport::TestCase end test 'required_fields should be an empty array' do - assert_equal Devise::Models::Validatable.required_fields(User), [] + assert_equal [], Devise::Models::Validatable.required_fields(User) end end diff --git a/test/test/controller_helpers_test.rb b/test/test/controller_helpers_test.rb index 588ca791..9aad7341 100644 --- a/test/test/controller_helpers_test.rb +++ b/test/test/controller_helpers_test.rb @@ -97,7 +97,7 @@ class TestControllerHelpersTest < Devise::ControllerTestCase test "returns the body of a failure app" do get :index - assert_equal response.body, "You are being redirected." + assert_equal "You are being redirected.", response.body end test "returns the content type of a failure app" do