Use follow_redirect! in account update tests
This commit is contained in:
parent
483f4c1341
commit
ab681e56ec
1 changed files with 4 additions and 4 deletions
|
@ -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/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue