require "application_system_test_case"
-class ReportNoteTest < ApplicationSystemTestCase
+class UserBlocksSystemTest < ApplicationSystemTestCase
test "revoke all link is absent for anonymous users when viewed user has active blocks" do
blocked_user = create(:user)
create(:user_block, :user => blocked_user)
visit user_path(blocked_user)
assert_link "Revoke all blocks"
- click_link "Revoke all blocks"
+ click_on "Revoke all blocks"
assert_title "Revoking all blocks on #{blocked_user.display_name}"
assert_text "Revoking all blocks on #{blocked_user.display_name}"
assert_unchecked_field "Are you sure you wish to revoke 1 active block?"
visit user_path(blocked_user)
assert_link "Revoke all blocks"
- click_link "Revoke all blocks"
+ click_on "Revoke all blocks"
assert_title "Revoking all blocks on #{blocked_user.display_name}"
assert_text "Revoking all blocks on #{blocked_user.display_name}"
assert_unchecked_field "Are you sure you wish to revoke 2 active blocks?"