summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>2014-01-11 10:14:24 +0000
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>2014-01-11 10:14:24 +0000
commit2a8ae016c566aa3c48f8eb1a310be39d20bcf3dc (patch)
treeba329ff4863b47629d27d4332d8593c06d9ea135
parent8f43b5307799d39019117d52ff79b6499c952594 (diff)
downloadredmine-2a8ae016c566aa3c48f8eb1a310be39d20bcf3dc.tar.gz
redmine-2a8ae016c566aa3c48f8eb1a310be39d20bcf3dc.zip
Rails4: replace deprecated find_all_by_* at TimelogControllerTest
git-svn-id: http://svn.redmine.org/redmine/trunk@12644 e93f8b46-1217-0410-a6f0-8f06a7374b81
-rw-r--r--test/functional/timelog_controller_test.rb8
1 files changed, 5 insertions, 3 deletions
diff --git a/test/functional/timelog_controller_test.rb b/test/functional/timelog_controller_test.rb
index 71586efa3..f138b896b 100644
--- a/test/functional/timelog_controller_test.rb
+++ b/test/functional/timelog_controller_test.rb
@@ -326,7 +326,7 @@ class TimelogControllerTest < ActionController::TestCase
assert_response 302
# check that the issues were updated
- assert_equal [9, 9], TimeEntry.find_all_by_id([1, 2]).collect {|i| i.activity_id}
+ assert_equal [9, 9], TimeEntry.where(:id => [1, 2]).collect {|i| i.activity_id}
end
def test_bulk_update_with_failure
@@ -347,7 +347,8 @@ class TimelogControllerTest < ActionController::TestCase
assert_response 302
# check that the issues were updated
- assert_equal [9, 9, 9], TimeEntry.find_all_by_id([1, 2, 4]).collect {|i| i.activity_id}
+ assert_equal [9, 9, 9], TimeEntry.where(:id => [1, 2, 4])
+ .collect {|i| i.activity_id}
end
def test_bulk_update_on_different_projects_without_rights
@@ -365,7 +366,8 @@ class TimelogControllerTest < ActionController::TestCase
post :bulk_update, :ids => [1, 2], :time_entry => { :custom_field_values => {'10' => '0'} }
assert_response 302
- assert_equal ["0", "0"], TimeEntry.find_all_by_id([1, 2]).collect {|i| i.custom_value_for(10).value}
+ assert_equal ["0", "0"], TimeEntry.where(:id => [1, 2])
+ .collect {|i| i.custom_value_for(10).value}
end
def test_post_bulk_update_should_redirect_back_using_the_back_url_parameter