Mercurial > hg > soundsoftware-site
diff test/unit/wiki_page_test.rb @ 1517:dffacf8a6908 redmine-2.5
Update to Redmine SVN revision 13367 on 2.5-stable branch
author | Chris Cannam |
---|---|
date | Tue, 09 Sep 2014 09:29:00 +0100 |
parents | e248c7af89ec |
children |
line wrap: on
line diff
--- a/test/unit/wiki_page_test.rb Tue Sep 09 09:28:31 2014 +0100 +++ b/test/unit/wiki_page_test.rb Tue Sep 09 09:29:00 2014 +0100 @@ -106,8 +106,8 @@ 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 @@ -117,15 +117,15 @@ page.destroy assert_nil WikiPage.find_by_id(2) - children = WikiPage.find_all_by_id(child_ids) - assert_equal child_ids.size, children.size + children = WikiPage.where(:id => child_ids) + assert_equal child_ids.size, children.count children.each do |child| assert_nil child.parent_id end end def test_updated_on_eager_load - page = WikiPage.with_updated_on.first(:order => 'id') + page = WikiPage.with_updated_on.order('id').first assert page.is_a?(WikiPage) assert_not_nil page.read_attribute(:updated_on) assert_equal Time.gm(2007, 3, 6, 23, 10, 51), page.content.updated_on