Replaces find(:first) calls.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10928 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -68,7 +68,7 @@ class FilesControllerTest < ActionController::TestCase
|
||||
end
|
||||
end
|
||||
assert_redirected_to '/projects/ecookbook/files'
|
||||
a = Attachment.find(:first, :order => 'created_on DESC')
|
||||
a = Attachment.order('created_on DESC').first
|
||||
assert_equal 'testfile.txt', a.filename
|
||||
assert_equal Project.find(1), a.container
|
||||
|
||||
@@ -88,7 +88,7 @@ class FilesControllerTest < ActionController::TestCase
|
||||
assert_response :redirect
|
||||
end
|
||||
assert_redirected_to '/projects/ecookbook/files'
|
||||
a = Attachment.find(:first, :order => 'created_on DESC')
|
||||
a = Attachment.order('created_on DESC').first
|
||||
assert_equal 'testfile.txt', a.filename
|
||||
assert_equal Version.find(2), a.container
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user