Rails4: replace deprecated Relation#first with finder options at WikiPageTest

git-svn-id: http://svn.redmine.org/redmine/trunk@12516 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Toshi MARUYAMA 2014-01-08 05:14:18 +00:00
parent 2977f95ad9
commit 585d93e499
1 changed files with 1 additions and 1 deletions

View File

@ -125,7 +125,7 @@ class WikiPageTest < ActiveSupport::TestCase
end end
def test_updated_on_eager_load 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 page.is_a?(WikiPage)
assert_not_nil page.read_attribute(:updated_on) assert_not_nil page.read_attribute(:updated_on)
assert_equal Time.gm(2007, 3, 6, 23, 10, 51), page.content.updated_on assert_equal Time.gm(2007, 3, 6, 23, 10, 51), page.content.updated_on