mirror of
https://github.com/Growstuff/growstuff.git
synced 2026-09-17 18:08:59 -04:00
Add photos to plantings to make them interesting in the spec
This commit is contained in:
1 parent
2521e52d71
commit
b8ea6116d4
1 file changed
+3
@@ -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