summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2007-09-07 20:07:54 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2007-09-07 20:07:54 +0000
commitfdf842a4c458b9f40c233bda221ff241df8eb108 (patch)
tree2c0347e452453725c478d9423ba610459bd135ed /test
parentb812705976645a58a441b00a1fc9050dd1fa6887 (diff)
downloadredmine-fdf842a4c458b9f40c233bda221ff241df8eb108.tar.gz
redmine-fdf842a4c458b9f40c233bda221ff241df8eb108.zip
Improved Redmine links:
* issue and changeset links generated only if the object exists * issue subject and status appear in the link title * strike issue link if issue is closed * red wiki page link if page doesn't exist * new icon for external links Wiki page cache had to be disabled. git-svn-id: http://redmine.rubyforge.org/svn/trunk@714 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test')
-rw-r--r--test/unit/helpers/application_helper_test.rb13
1 files changed, 8 insertions, 5 deletions
diff --git a/test/unit/helpers/application_helper_test.rb b/test/unit/helpers/application_helper_test.rb
index c618cec09..10372fb74 100644
--- a/test/unit/helpers/application_helper_test.rb
+++ b/test/unit/helpers/application_helper_test.rb
@@ -19,7 +19,8 @@ require File.dirname(__FILE__) + '/../../test_helper'
class ApplicationHelperTest < HelperTestCase
include ApplicationHelper
- fixtures :projects
+ include ActionView::Helpers::TextHelper
+ fixtures :projects, :repositories, :changesets, :trackers, :issue_statuses, :issues
def setup
super
@@ -53,12 +54,14 @@ class ApplicationHelperTest < HelperTestCase
end
def test_redmine_links
- issue_link = link_to('#52', {:controller => 'issues', :action => 'show', :id => 52}, :class => 'issue')
- changeset_link = link_to('r19', {:controller => 'repositories', :action => 'revision', :id => 1, :rev => 19}, :class => 'changeset')
+ issue_link = link_to('#3', {:controller => 'issues', :action => 'show', :id => 3},
+ :class => 'issue', :title => 'Error 281 when updating a recipe (New)')
+ changeset_link = link_to('r1', {:controller => 'repositories', :action => 'revision', :id => 1, :rev => 1},
+ :class => 'changeset', :title => 'My very first commit')
to_test = {
- '#52, #52 and #52.' => "#{issue_link}, #{issue_link} and #{issue_link}.",
- 'r19' => changeset_link
+ '#3, #3 and #3.' => "#{issue_link}, #{issue_link} and #{issue_link}.",
+ 'r1' => changeset_link
}
@project = Project.find(1)
to_test.each { |text, result| assert_equal "<p>#{result}</p>", textilizable(text) }