mirror of
https://github.com/Growstuff/growstuff.git
synced 2026-01-30 12:10:59 -05:00
Add photos to plantings to make them interesting in the spec
This commit is contained in:
@@ -265,6 +265,9 @@ describe Planting do
|
||||
context "with howmany argument" do
|
||||
it "only returns the number asked for" do
|
||||
@plantings = FactoryGirl.create_list(:planting, 10)
|
||||
@plantings.each do |p|
|
||||
p.photos << FactoryGirl.create(:photo, owner: planting.owner)
|
||||
end
|
||||
Planting.interesting.limit(3).count.should eq 3
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user