mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-18 04:39:14 +00:00
Remove useless test header setup for emails
Once upon a time we needed a helper to set the `from` header of emails. This is now set in the ApplicationMailer and not necessary any more.
This commit is contained in:
@@ -3,8 +3,6 @@
|
||||
require 'spec_helper'
|
||||
|
||||
describe OrderCycle do
|
||||
include OpenFoodNetwork::EmailHelper
|
||||
|
||||
it "should be valid when built from factory" do
|
||||
expect(build(:simple_order_cycle)).to be_valid
|
||||
end
|
||||
@@ -448,9 +446,6 @@ describe OrderCycle do
|
||||
create(:completed_order_with_totals, distributor: shop, user: user, order_cycle: oc)
|
||||
}
|
||||
|
||||
before do
|
||||
setup_email
|
||||
end
|
||||
before { order_cancelled.cancel }
|
||||
|
||||
it "only returns items from non-cancelled orders in the OC, placed by the user at the shop" do
|
||||
|
||||
@@ -3,8 +3,6 @@
|
||||
require 'spec_helper'
|
||||
|
||||
describe Spree::Order do
|
||||
include OpenFoodNetwork::EmailHelper
|
||||
|
||||
let(:user) { build(:user, email: "spree@example.com") }
|
||||
let(:order) { build(:order, user: user) }
|
||||
|
||||
@@ -909,10 +907,6 @@ describe Spree::Order do
|
||||
|
||||
describe "scopes" do
|
||||
describe "not_state" do
|
||||
before do
|
||||
setup_email
|
||||
end
|
||||
|
||||
it "finds only orders not in specified state" do
|
||||
o = FactoryBot.create(:completed_order_with_totals,
|
||||
distributor: create(:distributor_enterprise))
|
||||
|
||||
@@ -84,8 +84,6 @@ describe Spree::User do
|
||||
|
||||
context "#create" do
|
||||
it "should send a confirmation email" do
|
||||
setup_email
|
||||
|
||||
performing_deliveries do
|
||||
expect do
|
||||
create(:user, email: 'new_user@example.com', confirmation_sent_at: nil, confirmed_at: nil)
|
||||
@@ -118,8 +116,6 @@ describe Spree::User do
|
||||
|
||||
context "confirming email" do
|
||||
it "should send a welcome email" do
|
||||
setup_email
|
||||
|
||||
expect do
|
||||
create(:user, confirmed_at: nil).confirm
|
||||
end.to enqueue_job ActionMailer::MailDeliveryJob
|
||||
|
||||
Reference in New Issue
Block a user