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
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
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"
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"
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
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"
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"
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
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/edits]", 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
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/edits]", 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
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/edits]", 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
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/edits]", 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
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/edits]", 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