diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2015-01-19 21:23:11 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2015-01-19 21:23:11 +0000 |
commit | 0cde1fccbc76defae93aacfdb4ddd8acbb835281 (patch) | |
tree | 59eb471cd6f03391407f66e76c0dd841ba13e4b3 /test/functional | |
parent | 93ced61b2a08c657991f145a5997f65cbb90a611 (diff) | |
download | redmine-0cde1fccbc76defae93aacfdb4ddd8acbb835281.tar.gz redmine-0cde1fccbc76defae93aacfdb4ddd8acbb835281.zip |
Fixed that boolean custom field groups have same label for blank and false values (#18894).
git-svn-id: http://svn.redmine.org/redmine/trunk@13921 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/functional')
-rw-r--r-- | test/functional/issues_controller_test.rb | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/test/functional/issues_controller_test.rb b/test/functional/issues_controller_test.rb index ac1cb2ffa..d32c0ff49 100644 --- a/test/functional/issues_controller_test.rb +++ b/test/functional/issues_controller_test.rb @@ -294,6 +294,22 @@ class IssuesControllerTest < ActionController::TestCase end end + def test_index_grouped_by_boolean_custom_field_should_distinguish_blank_and_false_values + cf = IssueCustomField.create!(:name => 'Bool', :is_for_all => true, :tracker_ids => [1,2,3], :field_format => 'bool') + CustomValue.create!(:custom_field => cf, :customized => Issue.find(1), :value => '1') + CustomValue.create!(:custom_field => cf, :customized => Issue.find(2), :value => '0') + CustomValue.create!(:custom_field => cf, :customized => Issue.find(3), :value => '') + + with_settings :default_language => 'en' do + get :index, :project_id => 1, :set_filter => 1, :group_by => "cf_#{cf.id}" + assert_response :success + end + + assert_select 'tr.group', :text => /Yes/ + assert_select 'tr.group', :text => /No/ + assert_select 'tr.group', :text => /none/ + end + def test_index_with_query_grouped_by_tracker_in_normal_order 3.times {|i| Issue.generate!(:tracker_id => (i + 1))} |