diff --git a/spec/controllers/cart_controller_spec.rb b/spec/controllers/cart_controller_spec.rb index 7956cc9d86..f9c6f2a5bc 100644 --- a/spec/controllers/cart_controller_spec.rb +++ b/spec/controllers/cart_controller_spec.rb @@ -6,7 +6,11 @@ module OpenFoodWeb render_views let(:user) { FactoryGirl.create(:user) } - let(:product1) { FactoryGirl.create(:product) } + let(:product1) do + p1 = FactoryGirl.create(:product) + p1.update_column(:count_on_hand, 10) + p1 + end let(:cart) { Cart.create(user: user) } let(:distributor) { FactoryGirl.create(:distributor_enterprise) } @@ -82,4 +86,4 @@ module OpenFoodWeb end end end -end \ No newline at end of file +end