summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2015-04-25 08:00:11 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2015-04-25 08:00:11 +0000
commit16b5ff6aaf7974fd3232d567125e68a41fca2476 (patch)
treea02471dddec1043c6f0b0f67b8b850d7d8cce9ac /test
parenta45db2a6728162525ba3015f9d8ea08f89197231 (diff)
downloadredmine-16b5ff6aaf7974fd3232d567125e68a41fca2476.tar.gz
redmine-16b5ff6aaf7974fd3232d567125e68a41fca2476.zip
Custom field (long text format) displayed even if empty (#19482).
git-svn-id: http://svn.redmine.org/redmine/trunk@14215 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test')
-rw-r--r--test/functional/projects_controller_test.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/functional/projects_controller_test.rb b/test/functional/projects_controller_test.rb
index fa86f1a0f..70c32c5f0 100644
--- a/test/functional/projects_controller_test.rb
+++ b/test/functional/projects_controller_test.rb
@@ -363,6 +363,15 @@ class ProjectsControllerTest < ActionController::TestCase
assert_select 'li', :text => /#{f2.name}/
end
+ def test_show_should_not_display_blank_text_custom_fields
+ f1 = ProjectCustomField.generate! :field_format => 'text'
+
+ get :show, :id => 1
+ assert_response :success
+
+ assert_select 'li', :text => /#{f1.name}/, :count => 0
+ end
+
def test_show_should_not_fail_when_custom_values_are_nil
project = Project.find_by_identifier('ecookbook')
project.custom_values.first.update_attribute(:value, nil)