]> git.openstreetmap.org Git - rails.git/blob - test/controllers/notifications/diary_comment_view_test.rb
Merge remote-tracking branch 'upstream/pull/7289'
[rails.git] / test / controllers / notifications / diary_comment_view_test.rb
1 # frozen_string_literal: true
2
3 require "test_helper"
4
5 module Notifications
6   class DiaryCommentViewTest < ActionView::TestCase
7     def test_render
8       diary_comment = build_stubbed(:diary_comment)
9       notification = build_stubbed(:notification, :record => diary_comment)
10
11       render(
12         "notifications/notification",
13         :notification => notification
14       )
15
16       assert_dom ".web-notification" do
17         assert_dom "h2", "Diary comment"
18         assert_dom "time", "less than 1 minute ago"
19         assert_dom "blockquote", diary_comment.body
20       end
21     end
22   end
23 end