diff options
author | Go MAEDA <maeda@farend.jp> | 2018-11-26 00:23:08 +0000 |
---|---|---|
committer | Go MAEDA <maeda@farend.jp> | 2018-11-26 00:23:08 +0000 |
commit | 6a12b5839bf4f4ebceef398e167737ca0cca3c80 (patch) | |
tree | c56056c498a0226c67860e67421b6c6d0430810c /test | |
parent | ef6d0dd3556e8e9aeb6819f7a5018157488e1bd8 (diff) | |
download | redmine-6a12b5839bf4f4ebceef398e167737ca0cca3c80.tar.gz redmine-6a12b5839bf4f4ebceef398e167737ca0cca3c80.zip |
Add wiki class also for half width custom fields with text formatting enabled (#30027).
Patch by Marius BALTEANU.
git-svn-id: http://svn.redmine.org/redmine/trunk@17634 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test')
-rw-r--r-- | test/functional/issues_controller_test.rb | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/test/functional/issues_controller_test.rb b/test/functional/issues_controller_test.rb index 62d96bd10..901907347 100644 --- a/test/functional/issues_controller_test.rb +++ b/test/functional/issues_controller_test.rb @@ -2135,6 +2135,25 @@ class IssuesControllerTest < Redmine::ControllerTest assert_select "div.description ~ div.attribute.cf_#{field.id} div.value", :text => 'This is a long text' end + def test_show_custom_fields_with_full_text_formatting_should_be_rendered_using_wiki_class + half_field = IssueCustomField.create!(:name => 'Half width field', :field_format => 'text', :tracker_ids => [1], + :is_for_all => true, :text_formatting => 'full') + full_field = IssueCustomField.create!(:name => 'Full width field', :field_format => 'text', :full_width_layout => '1', + :tracker_ids => [1], :is_for_all => true, :text_formatting => 'full') + + issue = Issue.find(1) + issue.custom_field_values = {full_field.id => 'This is a long text', half_field.id => 'This is a short text'} + issue.save! + + get :show, :params => { + :id => 1 + } + assert_response :success + + assert_select "div.attribute.cf_#{half_field.id} div.value div.wiki", 1 + assert_select "div.attribute.cf_#{full_field.id} div.value div.wiki", 1 + end + def test_show_with_multi_user_custom_field field = IssueCustomField.create!(:name => 'Multi user', :field_format => 'user', :multiple => true, :tracker_ids => [1], :is_for_all => true) |