From: Toshi MARUYAMA Date: Thu, 9 Jan 2014 02:37:21 +0000 (+0000) Subject: Rails4: replace deprecated find_all_by_* at WikiPageTest X-Git-Tag: 2.5.0~354 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=4245a8854272d20932bec3e65ae014ed61a3680a;p=redmine.git Rails4: replace deprecated find_all_by_* at WikiPageTest git-svn-id: http://svn.redmine.org/redmine/trunk@12545 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- diff --git a/test/unit/wiki_page_test.rb b/test/unit/wiki_page_test.rb index b7d6130ed..7701bdfa6 100644 --- a/test/unit/wiki_page_test.rb +++ b/test/unit/wiki_page_test.rb @@ -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