Rails4: replace deprecated Relation#update_all at ProjectEnumerationsControllerTest

git-svn-id: http://svn.redmine.org/redmine/trunk@12632 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Toshi MARUYAMA 2014-01-11 09:23:52 +00:00
parent e11c68e417
commit 6e8d8da1f3
1 changed files with 2 additions and 1 deletions

View File

@ -212,7 +212,8 @@ class ProjectEnumerationsControllerTest < ActionController::TestCase
:active => true
})
assert project_activity.save
assert TimeEntry.update_all("activity_id = '#{project_activity.id}'", ["project_id = ? AND activity_id = ?", 1, 9])
assert TimeEntry.where(["project_id = ? AND activity_id = ?", 1, 9]).
update_all("activity_id = '#{project_activity.id}'")
assert_equal 3, TimeEntry.where(:activity_id => project_activity.id,
:project_id => 1).count
delete :destroy, :project_id => 1