From 87a43fc36e35bb26c00d7aa5f07bd403c29aeeb5 Mon Sep 17 00:00:00 2001 From: Will Marshall Date: Wed, 9 Apr 2014 12:17:23 +1000 Subject: [PATCH] Fixing the build! Some minor bugs due to mailer changes --- .../enterprises_distributor_info_rich_text_feature_spec.rb | 5 +++-- spec/mailers/order_mailer_spec.rb | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/spec/features/chili/enterprises_distributor_info_rich_text_feature_spec.rb b/spec/features/chili/enterprises_distributor_info_rich_text_feature_spec.rb index 46385cee0f..10214d69dc 100644 --- a/spec/features/chili/enterprises_distributor_info_rich_text_feature_spec.rb +++ b/spec/features/chili/enterprises_distributor_info_rich_text_feature_spec.rb @@ -58,7 +58,6 @@ feature "enterprises distributor info as rich text" do end scenario "viewing distributor info with product distribution", js: true do - ActionMailer::Base.deliveries.clear d = create(:distributor_enterprise, distributor_info: 'Chu ge sai yubi dan bisento tobi ashi yubi ge omote.', next_collection_at: 'Thursday 2nd May') p = create(:product, :distributors => [d]) @@ -67,6 +66,7 @@ feature "enterprises distributor info as rich text" do login_to_consumer_section visit spree.select_distributor_order_path(d) + ActionMailer::Base.deliveries.clear # -- Product details page visit spree.product_path p @@ -110,6 +110,7 @@ feature "enterprises distributor info as rich text" do setup_shipping_details d login_to_consumer_section + ActionMailer::Base.deliveries.clear click_link 'Green Grass' visit enterprise_path d @@ -146,7 +147,7 @@ feature "enterprises distributor info as rich text" do zone = create(:zone) c = Spree::Country.find_by_name('Australia') Spree::ZoneMember.create(:zoneable => c, :zone => zone) - create(:shipping_method, zone: zone) + create(:shipping_method, zone: zone, require_ship_address: false) create(:payment_method, :description => 'Cheque payment method', distributors: [distributor]) end diff --git a/spec/mailers/order_mailer_spec.rb b/spec/mailers/order_mailer_spec.rb index f0535d88a7..0fae742ef9 100644 --- a/spec/mailers/order_mailer_spec.rb +++ b/spec/mailers/order_mailer_spec.rb @@ -17,6 +17,7 @@ describe Spree::OrderMailer do product_distribution = create(:product_distribution, :product => product, :distributor => @distributor) @shipping_instructions = "pick up on thursday please!" @order1 = create(:order, :distributor => @distributor, :bill_address => @bill_address, :special_instructions => @shipping_instructions) + ActionMailer::Base.deliveries = [] end it "should send an email when given an order" do