Skip to content

Commit

Permalink
Fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
Marc Altmann committed Nov 27, 2015
1 parent bb83a1b commit 4242545
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions test/features/contents_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,13 @@
# [articles ids="1 2 3 4"]
# in content bodies is expanded to four article previews in a grid
user = FactoryGirl.create(:user)
article_ids = 4.times.map { FactoryGirl.create(:article, seller: user).id }
article_ids = []
(1..4).each do |n|
article_ids << FactoryGirl.create(:article, title: "Book #{n}", seller: user).id
end
content = FactoryGirl.create(:content,
body: "<p>[articles ids=\"#{article_ids.join(' ')}\"]</p>")
visit content_path content
puts page.body
page.must_have_content 'Book 1'
page.must_have_content 'Book 2'
page.must_have_content 'Book 3'
Expand Down

0 comments on commit 4242545

Please sign in to comment.