]> source.dussan.org Git - redmine.git/commitdiff
Rails4: replace deprecated Relation#update_all at ProjectNestedSetTest
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Thu, 9 Jan 2014 04:23:36 +0000 (04:23 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Thu, 9 Jan 2014 04:23:36 +0000 (04:23 +0000)
git-svn-id: http://svn.redmine.org/redmine/trunk@12552 e93f8b46-1217-0410-a6f0-8f06a7374b81

test/unit/project_nested_set_test.rb

index a65a4b8df46197cf4327ee0849fed5ab131953ca..6048cd23d3a90c1eb5c9bb61694d439218ddc870 100644 (file)
@@ -55,7 +55,7 @@ class ProjectNestedSetTest < ActiveSupport::TestCase
   end
 
   def test_rebuild_tree_should_build_valid_tree_even_with_valid_lft_rgt_values
-    Project.update_all "name = 'YY'", {:id => @a.id }
+    Project.where({:id => @a.id }).update_all("name = 'YY'")
     # lft and rgt values are still valid (Project.rebuild! would not update anything)
     # but projects are not ordered properly (YY is in the first place)