Commit d1342c857fd165725338cb72af9efb2eb86465ed
1 parent
c052ed1e
Exists in
master
and in
29 other branches
rails3: fix article_block tests
Showing
1 changed file
with
2 additions
and
2 deletions
Show diff stats
test/unit/article_block_test.rb
... | ... | @@ -72,13 +72,13 @@ class ArticleBlockTest < ActiveSupport::TestCase |
72 | 72 | |
73 | 73 | should "take available articles with an environment as the box owner" do |
74 | 74 | env = Environment.create!(:name => 'test env') |
75 | - env.articles.destroy_all | |
75 | + env.profiles.each { |profile| profile.articles.destroy_all } | |
76 | 76 | assert_equal [], env.articles |
77 | 77 | community = fast_create(Community) |
78 | 78 | a = fast_create(TextArticle, :profile_id => community.id, :name => 'test') |
79 | 79 | env.portal_community=community |
80 | 80 | env.save |
81 | - block = ArticleBlock.create(:article => a) | |
81 | + block = create(ArticleBlock, :article => a) | |
82 | 82 | env.boxes.first.blocks << block |
83 | 83 | block.save! |
84 | 84 | ... | ... |