Project

General

Profile

Feature #13946 » rm13946-add-tracker-name-to-issue-link-titles-tests-fixed-trunk@r14471.diff

Mischa The Evil, 2015-07-29 07:03

View differences:

app/helpers/application_helper.rb (working copy)
781 781
                link = link_to("##{oid}#{comment_suffix}",
782 782
                               issue_url(issue, :only_path => only_path, :anchor => anchor),
783 783
                               :class => issue.css_classes,
784
                               :title => "#{issue.subject.truncate(100)} (#{issue.status.name})")
784
                               :title => "#{issue.tracker.name}: #{issue.subject.truncate(100)} (#{issue.status.name})")
785 785
              end
786 786
            when 'document'
787 787
              if document = Document.visible.find_by_id(oid)
test/unit/helpers/application_helper_test.rb (working copy)
276 276

  
277 277
  def test_redmine_links
278 278
    issue_link = link_to('#3', {:controller => 'issues', :action => 'show', :id => 3},
279
                               :class => Issue.find(3).css_classes, :title => 'Error 281 when updating a recipe (New)')
279
                               :class => Issue.find(3).css_classes, :title => 'Bug: Error 281 when updating a recipe (New)')
280 280
    note_link = link_to('#3-14', {:controller => 'issues', :action => 'show', :id => 3, :anchor => 'note-14'},
281
                               :class => Issue.find(3).css_classes, :title => 'Error 281 when updating a recipe (New)')
281
                               :class => Issue.find(3).css_classes, :title => 'Bug: Error 281 when updating a recipe (New)')
282 282
    note_link2 = link_to('#3#note-14', {:controller => 'issues', :action => 'show', :id => 3, :anchor => 'note-14'},
283
                               :class => Issue.find(3).css_classes, :title => 'Error 281 when updating a recipe (New)')
283
                               :class => Issue.find(3).css_classes, :title => 'Bug: Error 281 when updating a recipe (New)')
284 284

  
285 285
    revision_link = link_to('r1', {:controller => 'repositories', :action => 'revision', :id => 'ecookbook', :rev => 1},
286 286
                                   :class => 'changeset', :title => 'My very first commit do not escaping #<>&')
......
964 964
    result2 = link_to('#1',
965 965
                      "/issues/1",
966 966
                      :class => Issue.find(1).css_classes,
967
                      :title => "Cannot print recipes (New)")
967
                      :title => "Bug: Cannot print recipes (New)")
968 968

  
969 969
    expected = <<-EXPECTED
970 970
<p>#{result1}</p>
test/unit/mailer_test.rb (working copy)
56 56
      # link to a referenced ticket
57 57
      assert_select 'a[href=?][title=?]',
58 58
                    'https://mydomain.foo/issues/1',
59
                    "Cannot print recipes (New)",
59
                    "Bug: Cannot print recipes (New)",
60 60
                    :text => '#1'
61 61
      # link to a changeset
62 62
      assert_select 'a[href=?][title=?]',
......
97 97
      # link to a referenced ticket
98 98
      assert_select 'a[href=?][title=?]',
99 99
                    'http://mydomain.foo/rdm/issues/1',
100
                    "Cannot print recipes (New)",
100
                    "Bug: Cannot print recipes (New)",
101 101
                    :text => '#1'
102 102
      # link to a changeset
103 103
      assert_select 'a[href=?][title=?]',
......
167 167
      # link to a referenced ticket
168 168
      assert_select 'a[href=?][title=?]',
169 169
                    'http://mydomain.foo/rdm/issues/1',
170
                    "Cannot print recipes (New)",
170
                    "Bug: Cannot print recipes (New)",
171 171
                    :text => '#1'
172 172
      # link to a changeset
173 173
      assert_select 'a[href=?][title=?]',
(2-2/2)