summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2008-07-10 13:36:28 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2008-07-10 13:36:28 +0000
commitd7eb689c745493b79f8debace522224012a88480 (patch)
tree90037e2ec95c24b3aa9b2e95ec5f33a7faffbf49 /test
parentbe4cc2f99e34316be4b8beb2e9040c5ea967a736 (diff)
downloadredmine-d7eb689c745493b79f8debace522224012a88480.tar.gz
redmine-d7eb689c745493b79f8debace522224012a88480.zip
Fixed: trailing period should not be included in redmine links of type class:id (#1612).
git-svn-id: http://redmine.rubyforge.org/svn/trunk@1650 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test')
-rw-r--r--test/unit/helpers/application_helper_test.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/unit/helpers/application_helper_test.rb b/test/unit/helpers/application_helper_test.rb
index d4f9e0247..56a36851b 100644
--- a/test/unit/helpers/application_helper_test.rb
+++ b/test/unit/helpers/application_helper_test.rb
@@ -82,6 +82,7 @@ class ApplicationHelperTest < HelperTestCase
:class => 'version')
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']}
to_test = {
# tickets
@@ -97,8 +98,15 @@ class ApplicationHelperTest < HelperTestCase
'version:"1.0"' => version_link,
# source
'source:/some/file' => link_to('source:/some/file', source_url, :class => 'source'),
+ 'source:/some/file.' => link_to('source:/some/file', source_url, :class => 'source') + ".",
+ 'source:/some/file.ext.' => link_to('source:/some/file.ext', source_url_with_ext, :class => 'source') + ".",
+ 'source:/some/file. ' => link_to('source:/some/file', source_url, :class => 'source') + ".",
+ 'source:/some/file.ext. ' => link_to('source:/some/file.ext', source_url_with_ext, :class => 'source') + ".",
+ 'source:/some/file, ' => link_to('source:/some/file', source_url, :class => 'source') + ",",
'source:/some/file@52' => link_to('source:/some/file@52', source_url.merge(:rev => 52), :class => 'source'),
+ 'source:/some/file.ext@52' => link_to('source:/some/file.ext@52', source_url_with_ext.merge(:rev => 52), :class => 'source'),
'source:/some/file#L110' => link_to('source:/some/file#L110', source_url.merge(:anchor => 'L110'), :class => 'source'),
+ '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'),
# escaping