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
This commit is contained in:
Jean-Philippe Lang
2011-11-26 17:37:20 +00:00
parent 0293ba7e9f
commit 5a1fcf826f
6 changed files with 107 additions and 18 deletions
+16
View File
@@ -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