Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/pull/5420'
Browse files Browse the repository at this point in the history
  • Loading branch information
tomhughes committed Dec 19, 2024
2 parents 0434bee + eeda506 commit 33bca7c
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions test/system/resolve_note_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,37 @@ class ResolveNoteTest < ApplicationSystemTestCase
end
end

test "can hide an open note as moderator" do
note = create(:note_with_comments)
user = create(:moderator_user)
sign_in_as(user)
visit note_path(note)

within_sidebar do
assert_button "Hide"

click_on "Hide"

assert_content "Hidden note ##{note.id}"
end
end

test "can hide a closed note as moderator" do
note = create(:note_with_comments, :closed)
user = create(:moderator_user)
sign_in_as(user)
visit note_path(note)

within_sidebar do
assert_button "Hide"

click_on "Hide"

assert_content "Hidden note ##{note.id}"
assert_no_content "<iframe" # leak from share textarea
end
end

test "can't resolve a note when blocked" do
note = create(:note_with_comments)
user = create(:user)
Expand Down

0 comments on commit 33bca7c

Please sign in to comment.