X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/459a798f4545c939ca33eaeb694f838e83b7b076..2403630da87df8a3b57913e8949ae0ff8f611d22:/test/controllers/users_controller_test.rb diff --git a/test/controllers/users_controller_test.rb b/test/controllers/users_controller_test.rb index 62eb79f0c..6eebd7f1a 100644 --- a/test/controllers/users_controller_test.rb +++ b/test/controllers/users_controller_test.rb @@ -475,36 +475,6 @@ class UsersControllerTest < ActionDispatch::IntegrationTest assert_select ".notice", /^User information updated successfully/ assert_select "form#accountForm > div.form-group > div#user_description_container > div#user_description_content > textarea#user_description", user.description - # Changing to a invalid editor should fail - user.preferred_editor = "unknown" - post user_account_path(user), :params => { :user => user.attributes } - assert_response :success - assert_template :account - assert_select ".notice", false - assert_select "form#accountForm > div.form-group > select#user_preferred_editor > option[selected]", false - - # Changing to a valid editor should work - user.preferred_editor = "id" - post user_account_path(user), :params => { :user => user.attributes } - assert_response :redirect - assert_redirected_to user_account_url(user) - get user_account_path(user) - assert_response :success - assert_template :account - assert_select ".notice", /^User information updated successfully/ - assert_select "form#accountForm > div.form-group > select#user_preferred_editor > option[selected][value=?]", "id" - - # Changing to the default editor should work - user.preferred_editor = "default" - post user_account_path(user), :params => { :user => user.attributes } - assert_response :redirect - assert_redirected_to user_account_url(user) - get user_account_path(user) - assert_response :success - assert_template :account - assert_select ".notice", /^User information updated successfully/ - assert_select "form#accountForm > div.form-group > select#user_preferred_editor > option[selected]", false - # Changing to an uploaded image should work image = Rack::Test::UploadedFile.new("test/gpx/fixtures/a.gif", "image/gif") post user_account_path(user), :params => { :avatar_action => "new", :user => user.attributes.merge(:avatar => image) }