diff --git a/test/unit/issue_test.rb b/test/unit/issue_test.rb index 0781c4541..a3df951a6 100644 --- a/test/unit/issue_test.rb +++ b/test/unit/issue_test.rb @@ -1459,10 +1459,9 @@ class IssueTest < ActiveSupport::TestCase assert_equal 2, groups.inject(0) {|sum, group| sum + group['total'].to_i} end - def test_recently_updated_with_limit_scopes + def test_recently_updated_scope #should return the last updated issue - assert_equal 1, Issue.recently_updated.with_limit(1).length - assert_equal Issue.find(:first, :order => "updated_on DESC"), Issue.recently_updated.with_limit(1).first + assert_equal Issue.reorder("updated_on DESC").first, Issue.recently_updated.limit(1).first end def test_on_active_projects_scope