diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2016-06-18 10:16:51 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2016-06-18 10:16:51 +0000 |
commit | 4566ac1ee9ee7ce0b41fcf72f855d268f45d0385 (patch) | |
tree | a1979859fe720e2a34832a13108c3402d59274f9 /test | |
parent | 1fb561782bd5ce4c5a9c23341dcff0411ce90426 (diff) | |
download | redmine-4566ac1ee9ee7ce0b41fcf72f855d268f45d0385.tar.gz redmine-4566ac1ee9ee7ce0b41fcf72f855d268f45d0385.zip |
Merged r15539 and r15550 (#23067).
git-svn-id: http://svn.redmine.org/redmine/branches/3.2-stable@15558 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test')
-rw-r--r-- | test/unit/lib/redmine/field_format/field_format_test.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/unit/lib/redmine/field_format/field_format_test.rb b/test/unit/lib/redmine/field_format/field_format_test.rb index 1f3bc20ea..13177375b 100644 --- a/test/unit/lib/redmine/field_format/field_format_test.rb +++ b/test/unit/lib/redmine/field_format/field_format_test.rb @@ -74,4 +74,12 @@ class Redmine::FieldFormatTest < ActionView::TestCase assert_equal "bar", field.format.formatted_custom_value(self, custom_value, false) assert_equal '<a href="http://foo/bar">bar</a>', field.format.formatted_custom_value(self, custom_value, true) end + + def test_text_field_with_url_pattern_and_value_containing_a_space_should_format_as_link + field = IssueCustomField.new(:field_format => 'string', :url_pattern => 'http://foo/%value%') + custom_value = CustomValue.new(:custom_field => field, :customized => Issue.new, :value => "foo bar") + + assert_equal "foo bar", field.format.formatted_custom_value(self, custom_value, false) + assert_equal '<a href="http://foo/foo%20bar">foo bar</a>', field.format.formatted_custom_value(self, custom_value, true) + end end |