Add a test for viewing a note opened by a deleted user
This commit is contained in:
parent
1e0377e6b3
commit
49dfae87ab
1 changed files with 9 additions and 0 deletions
|
@ -152,6 +152,15 @@ class NotesControllerTest < ActionDispatch::IntegrationTest
|
||||||
assert_select "div.note-comments ul li", :count => 1
|
assert_select "div.note-comments ul li", :count => 1
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def test_read_note_hidden_opener
|
||||||
|
hidden_user = create(:user, :deleted)
|
||||||
|
note_with_hidden_opener = create(:note)
|
||||||
|
create(:note_comment, :author => hidden_user, :note => note_with_hidden_opener)
|
||||||
|
|
||||||
|
sidebar_browse_check :note_path, note_with_hidden_opener.id, "notes/show"
|
||||||
|
assert_select "div.note-comments ul li", :count => 0
|
||||||
|
end
|
||||||
|
|
||||||
def test_read_closed_note
|
def test_read_closed_note
|
||||||
user = create(:user)
|
user = create(:user)
|
||||||
closed_note = create(:note_with_comments, :closed, :closed_by => user, :comments_count => 2)
|
closed_note = create(:note_with_comments, :closed, :closed_by => user, :comments_count => 2)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue