From a7be337a4c4da70995039405b7dcc8679cf52a76 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Mon, 27 Aug 2012 11:21:08 +0000 Subject: [PATCH] Updates test for r10243. git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10244 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- test/unit/issue_test.rb | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) 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 -- 2.39.5