mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
WIP Preparing to get rid of MailMethod model
Please give a look at the following links: - http://guides.spreecommerce.org/release_notes/spree_2_0_0.html#mailmethod-model-no-longer-exists - https://github.com/spree/spree/pull/2643
This commit is contained in:
committed by
Rob Harrington
parent
22b5431279
commit
cf4bd8d755
@@ -179,6 +179,12 @@ describe Spree::Admin::OrdersController do
|
||||
|
||||
context "when the distributor's ABN has been set" do
|
||||
before { distributor.update_attribute(:abn, "123") }
|
||||
before do
|
||||
Spree::MailMethod.create!(
|
||||
environment: Rails.env,
|
||||
preferred_mails_from: 'spree@example.com'
|
||||
)
|
||||
end
|
||||
it "should allow me to send order invoices" do
|
||||
expect do
|
||||
spree_get :invoice, params
|
||||
|
||||
@@ -19,6 +19,10 @@ describe Spree::OrderMailer do
|
||||
ship_address = create(:address, :address1 => "distributor address", :city => 'The Shire', :zipcode => "1234")
|
||||
@order1 = create(:order, :distributor => @distributor, :bill_address => @bill_address, ship_address: ship_address, :special_instructions => @shipping_instructions)
|
||||
ActionMailer::Base.deliveries = []
|
||||
Spree::MailMethod.create!(
|
||||
environment: Rails.env,
|
||||
preferred_mails_from: 'spree@example.com'
|
||||
)
|
||||
end
|
||||
|
||||
describe "order confirmation for customers" do
|
||||
|
||||
@@ -2,6 +2,12 @@ require 'spec_helper'
|
||||
require 'yaml'
|
||||
|
||||
describe ProducerMailer do
|
||||
before do
|
||||
Spree::MailMethod.create!(
|
||||
environment: Rails.env,
|
||||
preferred_mails_from: 'spree@example.com'
|
||||
)
|
||||
end
|
||||
let!(:zone) { create(:zone_with_member) }
|
||||
let!(:tax_rate) { create(:tax_rate, included_in_price: true, calculator: Spree::Calculator::DefaultTax.new, zone: zone, amount: 0.1) }
|
||||
let!(:tax_category) { create(:tax_category, tax_rates: [tax_rate]) }
|
||||
|
||||
@@ -487,6 +487,13 @@ describe Spree::Order do
|
||||
|
||||
describe "scopes" do
|
||||
describe "not_state" do
|
||||
before do
|
||||
Spree::MailMethod.create!(
|
||||
environment: Rails.env,
|
||||
preferred_mails_from: 'spree@example.com'
|
||||
)
|
||||
end
|
||||
|
||||
it "finds only orders not in specified state" do
|
||||
o = FactoryGirl.create(:completed_order_with_totals)
|
||||
o.cancel!
|
||||
|
||||
Reference in New Issue
Block a user