diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2011-11-26 17:37:20 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2011-11-26 17:37:20 +0000 |
commit | 5a1fcf826ffe4c4d6e0f839138d442725cae2ab5 (patch) | |
tree | 82b6f8d8f638d2798315cc82abd352c77c45cd28 /test/unit/query_test.rb | |
parent | 0293ba7e9f4f82788363ef699327887005db7b3e (diff) | |
download | redmine-5a1fcf826ffe4c4d6e0f839138d442725cae2ab5.tar.gz redmine-5a1fcf826ffe4c4d6e0f839138d442725cae2ab5.zip |
Sort the issue list by author/assignee according to user display format (#9669).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@7938 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/unit/query_test.rb')
-rw-r--r-- | test/unit/query_test.rb | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/test/unit/query_test.rb b/test/unit/query_test.rb index 6306e8721..e3f3c9249 100644 --- a/test/unit/query_test.rb +++ b/test/unit/query_test.rb @@ -443,6 +443,22 @@ class QueryTest < ActiveSupport::TestCase assert_nil q.group_by_column assert_nil q.group_by_statement end + + def test_sortable_columns_should_sort_assignees_according_to_user_format_setting + with_settings :user_format => 'lastname_coma_firstname' do + q = Query.new + assert q.sortable_columns.has_key?('assigned_to') + assert_equal %w(users.lastname users.firstname users.id), q.sortable_columns['assigned_to'] + end + end + + def test_sortable_columns_should_sort_authors_according_to_user_format_setting + with_settings :user_format => 'lastname_coma_firstname' do + q = Query.new + assert q.sortable_columns.has_key?('author') + assert_equal %w(authors.lastname authors.firstname authors.id), q.sortable_columns['author'] + end + end def test_default_sort q = Query.new |