From 090ccf2b63ad61b633ef02494f12c4d2715d207a Mon Sep 17 00:00:00 2001 From: Anton Khorev Date: Thu, 6 Feb 2025 22:45:31 +0300 Subject: [PATCH] Test showing note by suspended user with comment by other user --- test/controllers/notes_controller_test.rb | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/test/controllers/notes_controller_test.rb b/test/controllers/notes_controller_test.rb index 024380de1..a70bb32cd 100644 --- a/test/controllers/notes_controller_test.rb +++ b/test/controllers/notes_controller_test.rb @@ -161,6 +161,15 @@ class NotesControllerTest < ActionDispatch::IntegrationTest assert_select "div.note-comments ul li", :count => 0 end + def test_read_note_suspended_opener_and_comment + note = create(:note) + create(:note_comment, :note => note, :author => create(:user, :suspended)) + create(:note_comment, :note => note) + + sidebar_browse_check :note_path, note.id, "notes/show" + assert_select "div.note-comments ul li", :count => 1 + end + def test_read_closed_note user = create(:user) closed_note = create(:note_with_comments, :closed, :closed_by => user, :comments_count => 2) -- 2.39.5