Fix topic spec

This commit is contained in:
Chris Blanchard 2015-09-18 14:42:57 +01:00
parent 3bc78d58fc
commit 5cac7a874b

View file

@ -32,9 +32,8 @@ describe Topic do
it "returns 5 unique, most recently posted topics" do
topics = []
10.times do
topic = create :topic
topics << topic
3.times { create :post, topic: topic }
topic = create :topic, first_post: "Foo"
topics.push(topic)
end
recent_topics = Topic.recent_topics
topics.last(5).each do |topic|