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

test/unit/repository_test.rb

index 95f0437aefc6884a3bcbe68ffc2de83dde6feb61..43c62376c803c0438dfba8afed28992bf1f1e55b 100644 (file)
@@ -136,14 +136,12 @@ class RepositoryTest < ActiveSupport::TestCase
   end
 
   def test_identifier_should_not_be_frozen_for_a_saved_repository_with_blank_identifier
-    Repository.update_all(["identifier = ''"], "id = 10")
-
+    Repository.where(:id => 10).update_all(["identifier = ''"])
     assert_equal false, Repository.find(10).identifier_frozen?
   end
 
   def test_identifier_should_be_frozen_for_a_saved_repository_with_valid_identifier
-    Repository.update_all(["identifier = 'abc123'"], "id = 10")
-
+    Repository.where(:id => 10).update_all(["identifier = 'abc123'"])
     assert_equal true, Repository.find(10).identifier_frozen?
   end