]> source.dussan.org Git - redmine.git/commitdiff
Rails4: replace deprecated Relation#first with finder options at WikiPageTest
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Wed, 8 Jan 2014 05:14:18 +0000 (05:14 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Wed, 8 Jan 2014 05:14:18 +0000 (05:14 +0000)
git-svn-id: http://svn.redmine.org/redmine/trunk@12516 e93f8b46-1217-0410-a6f0-8f06a7374b81

test/unit/wiki_page_test.rb

index 34cc6f27c300beaecc275f5167724121e1c2a0c2..1f66cae7dbcd7cb041cbaa7f056d45a5c5fce4dd 100644 (file)
@@ -125,7 +125,7 @@ class WikiPageTest < ActiveSupport::TestCase
   end
 
   def test_updated_on_eager_load
-    page = WikiPage.with_updated_on.first(:order => 'id')
+    page = WikiPage.with_updated_on.order('id').first
     assert page.is_a?(WikiPage)
     assert_not_nil page.read_attribute(:updated_on)
     assert_equal Time.gm(2007, 3, 6, 23, 10, 51), page.content.updated_on