X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/3cd5f45e08d977d04a778ab8802f71df85edc314..933b0913304fdd581c7cb3f1ec30450d6e04c63a:/test/functional/user_controller_test.rb diff --git a/test/functional/user_controller_test.rb b/test/functional/user_controller_test.rb index 873beccad..3a9c93238 100644 --- a/test/functional/user_controller_test.rb +++ b/test/functional/user_controller_test.rb @@ -49,10 +49,6 @@ class UserControllerTest < ActionController::TestCase { :path => "/user/new", :method => :get }, { :controller => "user", :action => "new" } ) - assert_recognizes( - { :controller => "user", :action => "new" }, - { :path => "/create-account.html", :method => :get } - ) assert_routing( { :path => "/user/new", :method => :post }, @@ -112,10 +108,6 @@ class UserControllerTest < ActionController::TestCase { :path => "/user/forgot-password", :method => :post }, { :controller => "user", :action => "lost_password" } ) - assert_recognizes( - { :controller => "user", :action => "lost_password" }, - { :path => "/forgot-password.html", :method => :get } - ) assert_routing( { :path => "/user/reset-password", :method => :get }, { :controller => "user", :action => "reset_password" } @@ -260,7 +252,7 @@ class UserControllerTest < ActionController::TestCase assert_response :success assert_template 'new' - assert_select "form > fieldset > div.form-row > div.field_with_errors > input#user_email" + assert_select "form > fieldset > div.form-row > input.field_with_errors#user_email" end def test_user_create_submit_duplicate_email_uppercase @@ -275,7 +267,7 @@ class UserControllerTest < ActionController::TestCase assert_response :success assert_template 'new' - assert_select "form > fieldset > div.form-row > div.field_with_errors > input#user_email" + assert_select "form > fieldset > div.form-row > input.field_with_errors#user_email" end def test_user_create_submit_duplicate_name @@ -290,7 +282,7 @@ class UserControllerTest < ActionController::TestCase assert_response :success assert_template 'new' - assert_select "form > fieldset > div.form-row > div.field_with_errors > input#user_display_name" + assert_select "form > fieldset > div.form-row > input.field_with_errors#user_display_name" end def test_user_create_submit_duplicate_name_uppercase @@ -305,7 +297,7 @@ class UserControllerTest < ActionController::TestCase assert_response :success assert_template 'new' - assert_select "form > fieldset > div.form-row > div.field_with_errors > input#user_display_name" + assert_select "form > fieldset > div.form-row > input.field_with_errors#user_display_name" end def test_user_save_referer_params @@ -486,7 +478,7 @@ class UserControllerTest < ActionController::TestCase assert_template :account assert_select ".notice", false assert_select "div#errorExplanation" - assert_select "form#accountForm > fieldset > div.form-row > div.field_with_errors > input#user_display_name" + assert_select "form#accountForm > fieldset > div.form-row > input.field_with_errors#user_display_name" # Changing name to one that exists should fail, regardless of case new_attributes = user.attributes.dup.merge(:display_name => users(:public_user).display_name.upcase) @@ -495,7 +487,7 @@ class UserControllerTest < ActionController::TestCase assert_template :account assert_select ".notice", false assert_select "div#errorExplanation" - assert_select "form#accountForm > fieldset > div.form-row > div.field_with_errors > input#user_display_name" + assert_select "form#accountForm > fieldset > div.form-row > input.field_with_errors#user_display_name" # Changing name to one that doesn't exist should work new_attributes = user.attributes.dup.merge(:display_name => "new tester") @@ -516,7 +508,7 @@ class UserControllerTest < ActionController::TestCase assert_template :account assert_select ".notice", false assert_select "div#errorExplanation" - assert_select "form#accountForm > fieldset > div.form-row > div.field_with_errors > input#user_new_email" + assert_select "form#accountForm > fieldset > div.form-row > input.field_with_errors#user_new_email" # Changing email to one that exists should fail, regardless of case user.new_email = users(:public_user).email.upcase @@ -525,7 +517,7 @@ class UserControllerTest < ActionController::TestCase assert_template :account assert_select ".notice", false assert_select "div#errorExplanation" - assert_select "form#accountForm > fieldset > div.form-row > div.field_with_errors > input#user_new_email" + assert_select "form#accountForm > fieldset > div.form-row > input.field_with_errors#user_new_email" # Changing email to one that doesn't exist should work user.new_email = "new_tester@example.com"