Skip to content

Commit

Permalink
fix order mailer tests
Browse files Browse the repository at this point in the history
  • Loading branch information
abdellani committed Oct 3, 2023
1 parent 931dddc commit 77c2922
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions spec/mailers/order_mailer_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@
it "should call the invoice render with order as argument" do
expect(generator).not_to receive(:generate_or_update_latest_invoice)
expect(order).not_to receive(:invoices)
expect(renderer).to receive(:render_to_string).with(order).and_return("invoice")
expect(renderer).to receive(:render_to_string).with(order, nil).and_return("invoice")
expect {
email.deliver_now
}.to_not raise_error
Expand All @@ -255,7 +255,7 @@
it "should call the invoice renderer with invoice's presenter as argument" do
expect(generator).to receive(:generate_or_update_latest_invoice)
expect(order).to receive(:invoices).and_return([invoice])
expect(renderer).to receive(:render_to_string).with(invoice.presenter)
expect(renderer).to receive(:render_to_string).with(invoice.presenter, nil)
email.deliver_now
end
end
Expand Down

0 comments on commit 77c2922

Please sign in to comment.