]> source.dussan.org Git - redmine.git/commitdiff
Rails4 compatibility of RepositoryTest
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Fri, 27 Dec 2013 03:40:30 +0000 (03:40 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Fri, 27 Dec 2013 03:40:30 +0000 (03:40 +0000)
git-svn-id: http://svn.redmine.org/redmine/trunk@12470 e93f8b46-1217-0410-a6f0-8f06a7374b81

test/unit/repository_test.rb

index c269df7bb7f7192d1a3633843e4a3389d4a3f1fc..2bf12f1c20cc8ab262fb525ae27ae35c73cdde06 100644 (file)
@@ -153,8 +153,7 @@ class RepositoryTest < ActiveSupport::TestCase
   def test_destroy_should_delete_parents_associations
     changeset = Changeset.find(102)
     changeset.parents = Changeset.find_all_by_id([100, 101])
-
-    assert_difference 'Changeset.connection.select_all("select * from changeset_parents").size', -2 do
+    assert_difference 'Changeset.connection.select_all("select * from changeset_parents").count', -2 do
       Repository.find(10).destroy
     end
   end
@@ -162,8 +161,7 @@ class RepositoryTest < ActiveSupport::TestCase
   def test_destroy_should_delete_issues_associations
     changeset = Changeset.find(102)
     changeset.issues = Issue.find_all_by_id([1, 2])
-
-    assert_difference 'Changeset.connection.select_all("select * from changesets_issues").size', -2 do
+    assert_difference 'Changeset.connection.select_all("select * from changesets_issues").count', -2 do
       Repository.find(10).destroy
     end
   end