summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2008-08-10 22:18:23 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2008-08-10 22:18:23 +0000
commit16509203398f17fafca33136375263aec64b2a0f (patch)
tree7a6aa963c847072ac526142f3ad9150ff9f66dda /test
parentab4873b83d6f62fa78fdf07da4de2f2f7e0d738d (diff)
downloadredmine-16509203398f17fafca33136375263aec64b2a0f.tar.gz
redmine-16509203398f17fafca33136375263aec64b2a0f.zip
Adds links to forum messages using message#id syntax (#1756).
git-svn-id: http://redmine.rubyforge.org/svn/trunk@1729 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test')
-rw-r--r--test/unit/helpers/application_helper_test.rb11
1 files changed, 10 insertions, 1 deletions
diff --git a/test/unit/helpers/application_helper_test.rb b/test/unit/helpers/application_helper_test.rb
index 979321bd3..452c0b535 100644
--- a/test/unit/helpers/application_helper_test.rb
+++ b/test/unit/helpers/application_helper_test.rb
@@ -20,7 +20,11 @@ require File.dirname(__FILE__) + '/../../test_helper'
class ApplicationHelperTest < HelperTestCase
include ApplicationHelper
include ActionView::Helpers::TextHelper
- fixtures :projects, :repositories, :changesets, :trackers, :issue_statuses, :issues, :documents, :versions, :wikis, :wiki_pages, :wiki_contents, :roles, :enabled_modules
+ fixtures :projects, :roles, :enabled_modules,
+ :repositories, :changesets,
+ :trackers, :issue_statuses, :issues, :versions, :documents,
+ :wikis, :wiki_pages, :wiki_contents,
+ :boards, :messages
def setup
super
@@ -83,6 +87,8 @@ class ApplicationHelperTest < HelperTestCase
version_link = link_to('1.0', {:controller => 'versions', :action => 'show', :id => 2},
:class => 'version')
+ message_url = {:controller => 'messages', :action => 'show', :board_id => 1, :id => 4}
+
source_url = {:controller => 'repositories', :action => 'entry', :id => 'ecookbook', :path => ['some', 'file']}
source_url_with_ext = {:controller => 'repositories', :action => 'entry', :id => 'ecookbook', :path => ['some', 'file.ext']}
@@ -111,6 +117,9 @@ class ApplicationHelperTest < HelperTestCase
'source:/some/file.ext#L110' => link_to('source:/some/file.ext#L110', source_url_with_ext.merge(:anchor => 'L110'), :class => 'source'),
'source:/some/file@52#L110' => link_to('source:/some/file@52#L110', source_url.merge(:rev => 52, :anchor => 'L110'), :class => 'source'),
'export:/some/file' => link_to('export:/some/file', source_url.merge(:format => 'raw'), :class => 'source download'),
+ # message
+ 'message#4' => link_to('Post 2', message_url, :class => 'message'),
+ 'message#5' => link_to('RE: post 2', message_url.merge(:anchor => 'message-5'), :class => 'message'),
# escaping
'!#3.' => '#3.',
'!r1' => 'r1',