diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2015-09-26 08:12:44 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2015-09-26 08:12:44 +0000 |
commit | 42238a74f46423bf3d7514228e7cc818369a87b9 (patch) | |
tree | dd75d70ef47d78d81af12281ffc54372469be53a /test/unit/lib | |
parent | 7b12145ed904e531fa4e573cb5efb50abdedf6ac (diff) | |
download | redmine-42238a74f46423bf3d7514228e7cc818369a87b9.tar.gz redmine-42238a74f46423bf3d7514228e7cc818369a87b9.zip |
Display all versions in query filter (#19271).
git-svn-id: http://svn.redmine.org/redmine/trunk@14623 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/unit/lib')
-rw-r--r-- | test/unit/lib/redmine/field_format/version_field_format_test.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/unit/lib/redmine/field_format/version_field_format_test.rb b/test/unit/lib/redmine/field_format/version_field_format_test.rb index aad880e26..fb4a5dbc8 100644 --- a/test/unit/lib/redmine/field_format/version_field_format_test.rb +++ b/test/unit/lib/redmine/field_format/version_field_format_test.rb @@ -66,4 +66,14 @@ class Redmine::VersionFieldFormatTest < ActionView::TestCase field.cast_value([1,2, 42]) end end + + def test_query_filter_options_should_include_versions_with_any_status + field = IssueCustomField.new(:field_format => 'version', :version_status => ["open"]) + project = Project.find(1) + version = Version.generate!(:project => project, :status => 'locked') + query = Query.new(:project => project) + + assert_not_include version.name, field.possible_values_options(project).map(&:first) + assert_include version.name, field.query_filter_options(query)[:values].map(&:first) + end end |