3 class IssuesHelperTest < ActionView::TestCase
4 attr_accessor :current_user
7 target_user = create(:user)
8 self.current_user = create(:moderator_user)
10 n = (Settings.max_issues_count - 1)
12 create(:note_with_comments) do |note|
13 create(:issue, :reportable => note, :reported_user => target_user, :assigned_role => "moderator")
16 expected = <<~HTML.delete("\n")
17 <span class="badge count-number">#{n}</span>
19 assert_dom_equal expected, open_issues_count
22 create(:note_with_comments) do |note|
23 create(:issue, :reportable => note, :reported_user => target_user, :assigned_role => "moderator")
25 expected = <<~HTML.delete("\n")
26 <span class="badge count-number">#{n}+</span>
28 assert_dom_equal expected, open_issues_count