diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2012-05-05 16:21:22 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2012-05-05 16:21:22 +0000 |
commit | 18852b765a8a1715086cdb1b06d2f15680e56676 (patch) | |
tree | cbbf6a88e8b2cf0803bfbab53761949a4d3e4a21 /test/unit/tracker_test.rb | |
parent | ee8dcab9db0ad3bb3818051b7a1fd5211b9cdf0d (diff) | |
download | redmine-18852b765a8a1715086cdb1b06d2f15680e56676.tar.gz redmine-18852b765a8a1715086cdb1b06d2f15680e56676.zip |
Trackers should be sorted by position not by name.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9644 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/unit/tracker_test.rb')
-rw-r--r-- | test/unit/tracker_test.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/unit/tracker_test.rb b/test/unit/tracker_test.rb index 735f7e868..493637db5 100644 --- a/test/unit/tracker_test.rb +++ b/test/unit/tracker_test.rb @@ -50,4 +50,11 @@ class TrackerTest < ActiveSupport::TestCase def test_issue_statuses_should_be_empty_for_new_record assert_equal [], Tracker.new.issue_statuses end + + def test_sort_should_sort_by_position + a = Tracker.new(:name => 'Tracker A', :position => 2) + b = Tracker.new(:name => 'Tracker B', :position => 1) + + assert_equal [b, a], [a, b].sort + end end |