mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-27 01:43:22 +00:00
Remove useless clearing of test emails
They are cleared by the test environment anyway.
This commit is contained in:
@@ -10,13 +10,7 @@ describe Spree::OrderMailer do
|
||||
end
|
||||
let(:message) { Spree::OrderMailer.confirm_email_for_shop(order) }
|
||||
|
||||
before(:all) do
|
||||
ActionMailer::Base.deliveries.clear
|
||||
end
|
||||
|
||||
context "#deliver" do
|
||||
after { ActionMailer::Base.deliveries.clear }
|
||||
|
||||
it "should use the from address specified in the preference" do
|
||||
Spree::Config[:mails_from] = "no-reply@foobar.com"
|
||||
message.deliver_now
|
||||
|
||||
@@ -6,10 +6,6 @@ describe EnterpriseMailer do
|
||||
let!(:enterprise) { create(:enterprise) }
|
||||
let!(:user) { create(:user) }
|
||||
|
||||
before do
|
||||
ActionMailer::Base.deliveries = []
|
||||
end
|
||||
|
||||
describe "#welcome" do
|
||||
it "sends a welcome email when given an enterprise" do
|
||||
EnterpriseMailer.welcome(enterprise).deliver_now
|
||||
|
||||
@@ -153,14 +153,6 @@ describe Spree::OrderMailer do
|
||||
special_instructions: shipping_instructions)
|
||||
}
|
||||
|
||||
after do
|
||||
ActionMailer::Base.deliveries.clear
|
||||
end
|
||||
|
||||
before do
|
||||
ActionMailer::Base.deliveries = []
|
||||
end
|
||||
|
||||
describe "for customers" do
|
||||
it "should send an email to the customer when given an order" do
|
||||
Spree::OrderMailer.confirm_email_for_customer(order.id).deliver_now
|
||||
|
||||
@@ -5,14 +5,6 @@ require 'spec_helper'
|
||||
describe Spree::UserMailer do
|
||||
let(:user) { build(:user) }
|
||||
|
||||
after do
|
||||
ActionMailer::Base.deliveries.clear
|
||||
end
|
||||
|
||||
before do
|
||||
ActionMailer::Base.deliveries = []
|
||||
end
|
||||
|
||||
describe '#signup_confirmation' do
|
||||
it "sends email when given a user" do
|
||||
Spree::UserMailer.signup_confirmation(user).deliver_now
|
||||
|
||||
@@ -56,8 +56,6 @@ describe PlaceProxyOrder do
|
||||
end
|
||||
|
||||
it "records an issue and ignores it" do
|
||||
ActionMailer::Base.deliveries.clear
|
||||
|
||||
expect(summarizer).to receive(:record_issue).with(:complete, order).once
|
||||
expect { subject.call }.to_not change { order.reload.state }
|
||||
expect(order.payments.first.state).to eq "checkout"
|
||||
|
||||
@@ -125,7 +125,6 @@ describe "Authentication" do
|
||||
|
||||
describe "forgetting passwords" do
|
||||
before do
|
||||
ActionMailer::Base.deliveries.clear
|
||||
select_login_tab "Forgot Password?"
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user