assert_equal "commented", js["properties"]["comments"].last["action"]
assert_equal "This is an additional comment", js["properties"]["comments"].last["text"]
assert_equal third_user.display_name, js["properties"]["comments"].last["user"]
-
- ActionMailer::Base.deliveries.clear
end
def test_comment_with_notifications_success
second_user = create(:user)
third_user = create(:user)
- note_with_comments_by_users = create(:note) do |note|
+ note_with_comments_by_users = create(:note, :author => first_user) do |note|
create(:note_comment, :note => note, :author => first_user)
create(:note_comment, :note => note, :author => second_user)
end
assert_equal "commented", js["properties"]["comments"].last["action"]
assert_equal "This is an additional comment", js["properties"]["comments"].last["text"]
assert_equal third_user.display_name, js["properties"]["comments"].last["user"]
-
- ActionMailer::Base.deliveries.clear
end
def test_comment_twice_success