Refactor: use an ordered hash to store available filters and remove :order option (#13154).

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@11372 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2013-02-14 20:37:17 +00:00
parent f77edce621
commit 0be82ea2c4
6 changed files with 158 additions and 167 deletions
+5
View File
@@ -28,6 +28,11 @@ class QueryTest < ActiveSupport::TestCase
:projects_trackers,
:custom_fields_trackers
def test_available_filters_should_be_ordered
query = IssueQuery.new
assert_equal 0, query.available_filters.keys.index('status_id')
end
def test_custom_fields_for_all_projects_should_be_available_in_global_queries
query = IssueQuery.new(:project => nil, :name => '_')
assert query.available_filters.has_key?('cf_1')