]> source.dussan.org Git - redmine.git/commitdiff
Updates test for r10243.
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Mon, 27 Aug 2012 11:21:08 +0000 (11:21 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Mon, 27 Aug 2012 11:21:08 +0000 (11:21 +0000)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10244 e93f8b46-1217-0410-a6f0-8f06a7374b81

test/unit/issue_test.rb

index 0781c454128abad97e0f0d929cee29bd4e8c4936..a3df951a6b22def15a6a337e96ad341d29754d8a 100644 (file)
@@ -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