From fdf842a4c458b9f40c233bda221ff241df8eb108 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Fri, 7 Sep 2007 20:07:54 +0000 Subject: 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 --- test/unit/helpers/application_helper_test.rb | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'test') 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 "

#{result}

", textilizable(text) } -- cgit v1.2.3