Skip to content

Commit

Permalink
Ensure perform_deliveries is correctly set when testing user confirma…
Browse files Browse the repository at this point in the history
…tion emails
  • Loading branch information
Matt-Yorkley committed Mar 25, 2020
1 parent 8dfdc9b commit e27f7a4
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions spec/models/spree/user_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,11 @@
it "should send a confirmation email" do
setup_email

expect do
create(:user, email: '[email protected]', confirmation_sent_at: nil, confirmed_at: nil)
end.to send_confirmation_instructions
performing_deliveries do
expect do
create(:user, email: '[email protected]', confirmation_sent_at: nil, confirmed_at: nil)
end.to send_confirmation_instructions
end

sent_mail = ActionMailer::Base.deliveries.last
expect(sent_mail.to).to eq ['[email protected]']
Expand Down

0 comments on commit e27f7a4

Please sign in to comment.