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:
@@ -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')
|
||||
|
||||
Reference in New Issue
Block a user