From 3c959939750ae2ca0a212d06c323dbc85787389a Mon Sep 17 00:00:00 2001 From: Rohan Mitchell Date: Tue, 17 Dec 2013 15:25:17 +1100 Subject: [PATCH 1/5] Remove order sensitivity in specs --- spec/models/exchange_spec.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spec/models/exchange_spec.rb b/spec/models/exchange_spec.rb index 05141cbcf6..f4ebfc2d8a 100644 --- a/spec/models/exchange_spec.rb +++ b/spec/models/exchange_spec.rb @@ -81,12 +81,12 @@ describe Exchange do it "finds exchanges going to any of a number of enterprises" do Exchange.to_enterprises([coordinator]).should == [incoming_exchange] - Exchange.to_enterprises([coordinator, distributor]).should == [incoming_exchange, outgoing_exchange] + Exchange.to_enterprises([coordinator, distributor]).sort.should == [incoming_exchange, outgoing_exchange].sort end it "finds exchanges coming from any of a number of enterprises" do Exchange.from_enterprises([coordinator]).should == [outgoing_exchange] - Exchange.from_enterprises([supplier, coordinator]).should == [incoming_exchange, outgoing_exchange] + Exchange.from_enterprises([supplier, coordinator]).sort.should == [incoming_exchange, outgoing_exchange].sort end it "finds exchanges with a particular variant" do From 9f47ff64faffc69fc2a7ace0e5fdde588f67abdc Mon Sep 17 00:00:00 2001 From: Rohan Mitchell Date: Tue, 17 Dec 2013 15:29:25 +1100 Subject: [PATCH 2/5] Update spec now that bulk product edit is the default product edit view --- spec/features/admin/products_spec.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/spec/features/admin/products_spec.rb b/spec/features/admin/products_spec.rb index 646ed70346..e472311223 100644 --- a/spec/features/admin/products_spec.rb +++ b/spec/features/admin/products_spec.rb @@ -104,6 +104,7 @@ feature %q{ product = create(:simple_product, supplier: @supplier2) click_link 'Products' + within('#sub_nav') { click_link 'Products' } click_link product.name within('#sidebar') { click_link 'Product Distributions' } From 37f8ce68fb0c05d541651d4a878c4b3573afad73 Mon Sep 17 00:00:00 2001 From: Will Marshall Date: Thu, 19 Dec 2013 11:58:08 +1100 Subject: [PATCH 3/5] Adding one additional mailer test --- spec/features/consumer/checkout_spec.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/spec/features/consumer/checkout_spec.rb b/spec/features/consumer/checkout_spec.rb index df4ea5500b..98cafcfdac 100644 --- a/spec/features/consumer/checkout_spec.rb +++ b/spec/features/consumer/checkout_spec.rb @@ -414,6 +414,7 @@ feature %q{ # -- Checkout: Email email = ActionMailer::Base.deliveries.last + email.from.include?(@distributor_oc.email).should == true email.body.should =~ /Distribution[\s+]\$54.00/ end From aaa2999ee1e09f9b5d367f91e122dc33c74d5e87 Mon Sep 17 00:00:00 2001 From: Will Marshall Date: Thu, 19 Dec 2013 11:58:21 +1100 Subject: [PATCH 4/5] Dropping our override of ActionMailer --- config/initializers/spree.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/config/initializers/spree.rb b/config/initializers/spree.rb index bd106caf5a..9a93593f45 100644 --- a/config/initializers/spree.rb +++ b/config/initializers/spree.rb @@ -22,6 +22,7 @@ Spree.config do |config| # -- spree_paypal_express # Auto-capture payments. Without this option, payments must be manually captured in the paypal interface. config.auto_capture = true + config.override_actionmailer_config = false end From 87cef4edcca2a91a3f5d446e6df5e1fb741b5637 Mon Sep 17 00:00:00 2001 From: Will Marshall Date: Thu, 19 Dec 2013 12:29:21 +1100 Subject: [PATCH 5/5] Reverting previous commit --- config/initializers/spree.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/initializers/spree.rb b/config/initializers/spree.rb index 9a93593f45..0460865c7e 100644 --- a/config/initializers/spree.rb +++ b/config/initializers/spree.rb @@ -22,7 +22,7 @@ Spree.config do |config| # -- spree_paypal_express # Auto-capture payments. Without this option, payments must be manually captured in the paypal interface. config.auto_capture = true - config.override_actionmailer_config = false + #config.override_actionmailer_config = false end