X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/44629832dd0207d7b0f50b93f1d00b4373dd4d49..e418075e26d80d68e4127d3358a2d8b11dee3a13:/test/functional/user_controller_test.rb diff --git a/test/functional/user_controller_test.rb b/test/functional/user_controller_test.rb index 66fcef785..d4121c1bd 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" } @@ -397,7 +389,7 @@ class UserControllerTest < ActionController::TestCase end assert_response :success assert_template :lost_password - assert_select "div#error", /^Could not find that email address/ + assert_select ".error", /^Could not find that email address/ # Test resetting using the address as recorded for a user that has an # address which is case insensitively unique @@ -476,7 +468,7 @@ class UserControllerTest < ActionController::TestCase assert_response :success assert_template :account assert_select "div#errorExplanation", false - assert_select "div#notice", /^User information updated successfully/ + assert_select ".notice", /^User information updated successfully/ assert_select "form#accountForm > fieldset > div.form-row > div#user_description_container > div#user_description_content > textarea#user_description", user.description # Changing name to one that exists should fail @@ -484,7 +476,7 @@ class UserControllerTest < ActionController::TestCase post :account, { :display_name => user.display_name, :user => new_attributes }, { "user" => user.id } assert_response :success assert_template :account - assert_select "div#notice", false + assert_select ".notice", false assert_select "div#errorExplanation" assert_select "form#accountForm > fieldset > div.form-row > div.field_with_errors > input#user_display_name" @@ -493,7 +485,7 @@ class UserControllerTest < ActionController::TestCase post :account, { :display_name => user.display_name, :user => new_attributes }, { "user" => user.id } assert_response :success assert_template :account - assert_select "div#notice", false + assert_select ".notice", false assert_select "div#errorExplanation" assert_select "form#accountForm > fieldset > div.form-row > div.field_with_errors > input#user_display_name" @@ -503,7 +495,7 @@ class UserControllerTest < ActionController::TestCase assert_response :success assert_template :account assert_select "div#errorExplanation", false - assert_select "div#notice", /^User information updated successfully/ + assert_select ".notice", /^User information updated successfully/ assert_select "form#accountForm > fieldset > div.form-row > input#user_display_name[value=?]", "new tester" # Record the change of name @@ -514,7 +506,7 @@ class UserControllerTest < ActionController::TestCase post :account, { :display_name => user.display_name, :user => user.attributes }, { "user" => user.id } assert_response :success assert_template :account - assert_select "div#notice", false + assert_select ".notice", false assert_select "div#errorExplanation" assert_select "form#accountForm > fieldset > div.form-row > div.field_with_errors > input#user_new_email" @@ -523,7 +515,7 @@ class UserControllerTest < ActionController::TestCase post :account, { :display_name => user.display_name, :user => user.attributes }, { "user" => user.id } assert_response :success assert_template :account - assert_select "div#notice", false + assert_select ".notice", false assert_select "div#errorExplanation" assert_select "form#accountForm > fieldset > div.form-row > div.field_with_errors > input#user_new_email" @@ -533,7 +525,7 @@ class UserControllerTest < ActionController::TestCase assert_response :success assert_template :account assert_select "div#errorExplanation", false - assert_select "div#notice", /^User information updated successfully/ + assert_select ".notice", /^User information updated successfully/ assert_select "form#accountForm > fieldset > div.form-row > input#user_new_email[value=?]", user.new_email end @@ -548,7 +540,7 @@ class UserControllerTest < ActionController::TestCase get :view, {:display_name => "test"} assert_response :success assert_select "div#userinformation" do - assert_select "a[href=/user/test/edits]", 1 + assert_select "a[href^=/user/test/history]", 1 assert_select "a[href=/user/test/traces]", 1 assert_select "a[href=/user/test/diary]", 1 assert_select "a[href=/user/test/diary/comments]", 1 @@ -562,7 +554,7 @@ class UserControllerTest < ActionController::TestCase get :view, {:display_name => "blocked"} assert_response :success assert_select "div#userinformation" do - assert_select "a[href=/user/blocked/edits]", 1 + assert_select "a[href^=/user/blocked/history]", 1 assert_select "a[href=/user/blocked/traces]", 1 assert_select "a[href=/user/blocked/diary]", 1 assert_select "a[href=/user/blocked/diary/comments]", 1 @@ -576,7 +568,7 @@ class UserControllerTest < ActionController::TestCase get :view, {:display_name => "moderator"} assert_response :success assert_select "div#userinformation" do - assert_select "a[href=/user/moderator/edits]", 1 + assert_select "a[href^=/user/moderator/history]", 1 assert_select "a[href=/user/moderator/traces]", 1 assert_select "a[href=/user/moderator/diary]", 1 assert_select "a[href=/user/moderator/diary/comments]", 1 @@ -593,7 +585,7 @@ class UserControllerTest < ActionController::TestCase get :view, {:display_name => "test"} assert_response :success assert_select "div#userinformation" do - assert_select "a[href=/user/test/edits]", 1 + assert_select "a[href^=/user/test/history]", 1 assert_select "a[href=/traces/mine]", 1 assert_select "a[href=/user/test/diary]", 1 assert_select "a[href=/user/test/diary/comments]", 1 @@ -610,7 +602,7 @@ class UserControllerTest < ActionController::TestCase get :view, {:display_name => "test"} assert_response :success assert_select "div#userinformation" do - assert_select "a[href=/user/test/edits]", 1 + assert_select "a[href^=/user/test/history]", 1 assert_select "a[href=/user/test/traces]", 1 assert_select "a[href=/user/test/diary]", 1 assert_select "a[href=/user/test/diary/comments]", 1