From d1342c857fd165725338cb72af9efb2eb86465ed Mon Sep 17 00:00:00 2001 From: Victor Costa Date: Fri, 17 Jan 2014 15:53:04 -0300 Subject: [PATCH] rails3: fix article_block tests --- test/unit/article_block_test.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/unit/article_block_test.rb b/test/unit/article_block_test.rb index 477f262..107070a 100644 --- a/test/unit/article_block_test.rb +++ b/test/unit/article_block_test.rb @@ -72,13 +72,13 @@ class ArticleBlockTest < ActiveSupport::TestCase should "take available articles with an environment as the box owner" do env = Environment.create!(:name => 'test env') - env.articles.destroy_all + env.profiles.each { |profile| profile.articles.destroy_all } assert_equal [], env.articles community = fast_create(Community) a = fast_create(TextArticle, :profile_id => community.id, :name => 'test') env.portal_community=community env.save - block = ArticleBlock.create(:article => a) + block = create(ArticleBlock, :article => a) env.boxes.first.blocks << block block.save! -- libgit2 0.21.2