summaryrefslogtreecommitdiffstats
path: root/test/functional/files_controller_test.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2012-12-03 18:21:32 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2012-12-03 18:21:32 +0000
commit31c33f462d92aead29b8feb6445d8fe5626c4963 (patch)
tree0818c626e553e1cbb606e9c23a7342583288d448 /test/functional/files_controller_test.rb
parent013c6fe009e74892659c64c2936a2668a9663985 (diff)
downloadredmine-31c33f462d92aead29b8feb6445d8fe5626c4963.tar.gz
redmine-31c33f462d92aead29b8feb6445d8fe5626c4963.zip
Replaces find(:first) calls.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10928 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/functional/files_controller_test.rb')
-rw-r--r--test/functional/files_controller_test.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/functional/files_controller_test.rb b/test/functional/files_controller_test.rb
index 5e3c9d68b..8691a1818 100644
--- a/test/functional/files_controller_test.rb
+++ b/test/functional/files_controller_test.rb
@@ -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