diff options
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 |