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

git-svn-id: http://svn.redmine.org/redmine/trunk@12551 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Toshi MARUYAMA 2014-01-09 04:23:19 +00:00
parent 132021f895
commit 394628f205
1 changed files with 2 additions and 3 deletions

View File

@ -663,7 +663,7 @@ class MailHandlerTest < ActiveSupport::TestCase
end end
end end
end end
journal = Journal.first(:order => 'id DESC') journal = Journal.order('id DESC').first
assert_equal Issue.find(2), journal.journalized assert_equal Issue.find(2), journal.journalized
assert_equal 1, journal.details.size assert_equal 1, journal.details.size
@ -846,8 +846,7 @@ class MailHandlerTest < ActiveSupport::TestCase
:unknown_user => 'create' :unknown_user => 'create'
) )
end end
user = User.order('id DESC').first
user = User.first(:order => 'id DESC')
assert_equal "foo@example.org", user.mail assert_equal "foo@example.org", user.mail
str1 = "\xc3\x84\xc3\xa4" str1 = "\xc3\x84\xc3\xa4"
str2 = "\xc3\x96\xc3\xb6" str2 = "\xc3\x96\xc3\xb6"