X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/1c2a7b0a077d97a88bc0f058874ac0595e9d6958..eeda506ae15914d2a7a60726d89c36e176df0eb9:/test/system/resolve_note_test.rb diff --git a/test/system/resolve_note_test.rb b/test/system/resolve_note_test.rb index 7f47e45e2..f9c28a999 100644 --- a/test/system/resolve_note_test.rb +++ b/test/system/resolve_note_test.rb @@ -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 "