From: Anton Khorev Date: Sun, 16 Feb 2025 23:19:09 +0000 (+0300) Subject: Use follow_redirect! in account update tests X-Git-Tag: live~108^2~2 X-Git-Url: https://git.openstreetmap.org./rails.git/commitdiff_plain/ab681e56ecc2d30545fcc861de7ba5c3de1b32bc?ds=inline;hp=--cc Use follow_redirect! in account update tests --- ab681e56ecc2d30545fcc861de7ba5c3de1b32bc diff --git a/test/controllers/accounts_controller_test.rb b/test/controllers/accounts_controller_test.rb index ce8a62242..d1ed14e50 100644 --- a/test/controllers/accounts_controller_test.rb +++ b/test/controllers/accounts_controller_test.rb @@ -71,8 +71,8 @@ class AccountsControllerTest < ActionDispatch::IntegrationTest # Changing name to one that doesn't exist should work new_attributes = user.attributes.dup.merge(:display_name => "new tester") patch account_path, :params => { :user => new_attributes } - assert_redirected_to edit_account_url - get edit_account_path + assert_redirected_to edit_account_path + follow_redirect! assert_response :success assert_template :edit assert_select ".alert-success", /^User information updated successfully/ @@ -112,8 +112,8 @@ class AccountsControllerTest < ActionDispatch::IntegrationTest patch account_path, :params => { :user => user.attributes } end end - assert_redirected_to edit_account_url - get edit_account_path + assert_redirected_to edit_account_path + follow_redirect! assert_response :success assert_template :edit assert_select ".alert-success", /^User information updated successfully/