]> git.openstreetmap.org Git - rails.git/blob - test/controllers/notifications/diary_comment_view_test.rb
Localisation updates from https://translatewiki.net.
[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       notification_wrapper = UserNotifications::DiaryCommentNotification.new(notification)
11
12       render "notifications/diary_comment", :notification => notification_wrapper
13
14       assert_dom ".user-notification h2", "Diary comment"
15       assert_dom ".user-notification time", "less than 1 minute ago"
16       assert_dom ".user-notification blockquote", diary_comment.body
17     end
18   end
19 end