Adds "sorted" scope to Principal and User and sort users/groups properly.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@11259 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2013-01-23 17:44:28 +00:00
parent c7df78f3b6
commit e53a5de918
8 changed files with 33 additions and 4 deletions
+4
View File
@@ -34,6 +34,10 @@ class UserTest < ActiveSupport::TestCase
@dlopper = User.find(3)
end
def test_sorted_scope_should_sort_user_by_display_name
assert_equal User.all.map(&:name).map(&:downcase).sort, User.sorted.all.map(&:name).map(&:downcase)
end
def test_generate
User.generate!(:firstname => 'Testing connection')
User.generate!(:firstname => 'Testing connection')