diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2013-01-23 17:44:28 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2013-01-23 17:44:28 +0000 |
commit | e53a5de918c1db1f409df8d72a0cb5f38b4c7671 (patch) | |
tree | bea491687e40e92fa1713da2ba363cece392a24e /test/unit/user_test.rb | |
parent | c7df78f3b6aee78403e8563b504e10770270fb24 (diff) | |
download | redmine-e53a5de918c1db1f409df8d72a0cb5f38b4c7671.tar.gz redmine-e53a5de918c1db1f409df8d72a0cb5f38b4c7671.zip |
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
Diffstat (limited to 'test/unit/user_test.rb')
-rw-r--r-- | test/unit/user_test.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/test/unit/user_test.rb b/test/unit/user_test.rb index bf74dd6da..c0e51d469 100644 --- a/test/unit/user_test.rb +++ b/test/unit/user_test.rb @@ -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') |