X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/31805df53f8ea4a324485724175a4a21403a51bc..9929c1b585bd0e0b088cc785af06720d46f2dcce:/test/controllers/accounts_controller_test.rb?ds=sidebyside diff --git a/test/controllers/accounts_controller_test.rb b/test/controllers/accounts_controller_test.rb index ce8a62242..f13574213 100644 --- a/test/controllers/accounts_controller_test.rb +++ b/test/controllers/accounts_controller_test.rb @@ -12,6 +12,10 @@ class AccountsControllerTest < ActionDispatch::IntegrationTest { :path => "/account", :method => :put }, { :controller => "accounts", :action => "update" } ) + assert_routing( + { :path => "/account", :method => :delete }, + { :controller => "accounts", :action => "destroy" } + ) end def test_account @@ -71,8 +75,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 +116,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/