mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-11 03:40:20 +00:00
Remove puts from specs, fix failing controller spec
This commit is contained in:
@@ -108,14 +108,16 @@ module Admin
|
||||
|
||||
before do
|
||||
controller.stub spree_current_user: admin_user
|
||||
spree_post :notify_producers, {id: order_cycle.id}
|
||||
end
|
||||
|
||||
it "enqueues a job" do
|
||||
expect(Delayed::Job).to receive(:enqueue).once
|
||||
expect do
|
||||
spree_post :notify_producers, {id: order_cycle.id}
|
||||
end.to enqueue_job OrderCycleNotificationJob
|
||||
end
|
||||
|
||||
it "redirects back to the order cycles path with a success message" do
|
||||
spree_post :notify_producers, {id: order_cycle.id}
|
||||
expect(response).to redirect_to admin_order_cycles_path
|
||||
flash[:notice].should == 'Emails to be sent to producers have been queued for sending.'
|
||||
end
|
||||
|
||||
@@ -28,7 +28,6 @@ describe ProducerMailer do
|
||||
|
||||
it "should send an email when an order cycle is closed" do
|
||||
ProducerMailer.order_cycle_report(s1, order_cycle).deliver
|
||||
puts ActionMailer::Base.deliveries
|
||||
ActionMailer::Base.deliveries.count.should == 1
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user