]> source.dussan.org Git - redmine.git/commitdiff
Rails4: replace deprecated find_all_by_* at WikiPageTest
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Thu, 9 Jan 2014 02:37:21 +0000 (02:37 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Thu, 9 Jan 2014 02:37:21 +0000 (02:37 +0000)
git-svn-id: http://svn.redmine.org/redmine/trunk@12545 e93f8b46-1217-0410-a6f0-8f06a7374b81

test/unit/wiki_page_test.rb

index b7d6130ed552efa8268e43e22594494f64971a5f..7701bdfa6fab83da34da6a59c6dbb7ba6c4fbe1d 100644 (file)
@@ -106,8 +106,8 @@ class WikiPageTest < ActiveSupport::TestCase
     page.destroy
     assert_nil WikiPage.find_by_id(1)
     # make sure that page content and its history are deleted
-    assert WikiContent.find_all_by_page_id(1).empty?
-    assert WikiContent.versioned_class.find_all_by_page_id(1).empty?
+    assert_equal 0, WikiContent.where(:page_id => 1).count
+    assert_equal 0, WikiContent.versioned_class.where(:page_id => 1).count
   end
 
   def test_destroy_should_not_nullify_children