X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/caf2e2a242182f2c0dac78fc3f2f39b3fbbc8299..085d8ebe6a6cfd490d52de959b14c1b2bd7da6f6:/test/controllers/profiles_controller_test.rb diff --git a/test/controllers/profiles_controller_test.rb b/test/controllers/profiles_controller_test.rb index 38e73a03f..5b11127c7 100644 --- a/test/controllers/profiles_controller_test.rb +++ b/test/controllers/profiles_controller_test.rb @@ -26,7 +26,7 @@ class ProfilesControllerTest < ActionDispatch::IntegrationTest follow_redirect! assert_response :success assert_template :show - assert_select ".notice", /^Profile updated./ + assert_select ".alert-success", /^Profile updated./ assert_select "div", "new description" # Changing to an uploaded image should work @@ -37,9 +37,9 @@ class ProfilesControllerTest < ActionDispatch::IntegrationTest follow_redirect! assert_response :success assert_template :show - assert_select ".notice", /^Profile updated./ + assert_select ".alert-success", /^Profile updated./ get edit_profile_path - assert_select "form > fieldset.form-group > div.form-row > div.col-sm-10 > div.form-check > input[name=avatar_action][checked][value=?]", "keep" + assert_select "form > fieldset > div > div.col-sm-10 > div.form-check > input[name=avatar_action][checked][value=?]", "keep" # Changing to a gravatar image should work put profile_path, :params => { :avatar_action => "gravatar", :user => { :description => user.description } } @@ -48,9 +48,9 @@ class ProfilesControllerTest < ActionDispatch::IntegrationTest follow_redirect! assert_response :success assert_template :show - assert_select ".notice", /^Profile updated./ + assert_select ".alert-success", /^Profile updated./ get edit_profile_path - assert_select "form > fieldset.form-group > div.form-row > div.col-sm-10 > div.form-group > div.form-check > input[name=avatar_action][checked][value=?]", "gravatar" + assert_select "form > fieldset > div > div.col-sm-10 > div > div.form-check > input[name=avatar_action][checked][value=?]", "gravatar" # Removing the image should work put profile_path, :params => { :avatar_action => "delete", :user => { :description => user.description } } @@ -59,9 +59,9 @@ class ProfilesControllerTest < ActionDispatch::IntegrationTest follow_redirect! assert_response :success assert_template :show - assert_select ".notice", /^Profile updated./ + assert_select ".alert-success", /^Profile updated./ get edit_profile_path - assert_select "form > fieldset.form-group > div.form-row > div.col-sm-10 > div.form-check > input[name=avatar_action][checked]", false - assert_select "form > fieldset.form-group > div.form-row > div.col-sm-10 > div.form-group > div.form-check > input[name=avatar_action][checked]", false + assert_select "form > fieldset > div > div.col-sm-10 > div > input[name=avatar_action][checked]", false + assert_select "form > fieldset > div > div.col-sm-10 > div > div.form-check > input[name=avatar_action][checked]", false end end