From 5c260dae51b02560020a25642fd38da5d9e7747d Mon Sep 17 00:00:00 2001 From: Pau Perez Date: Mon, 14 May 2018 12:30:11 +0200 Subject: [PATCH] Remove no longer valid tests `#available_to_order?` is gone in Spree 2.0 and our customization on top of it went away with #2256. --- spec/models/spree/shipping_method_spec.rb | 28 ----------------------- 1 file changed, 28 deletions(-) diff --git a/spec/models/spree/shipping_method_spec.rb b/spec/models/spree/shipping_method_spec.rb index bd759edcc7..afb0ea59c4 100644 --- a/spec/models/spree/shipping_method_spec.rb +++ b/spec/models/spree/shipping_method_spec.rb @@ -35,34 +35,6 @@ module Spree ShippingMethod.by_name.should == [sm2, sm3, sm1] end - - describe "availability" do - let(:sm) { create(:shipping_method) } - let(:currency) { 'AUD' } - - before do - sm.calculator.preferred_currency = currency - end - - it "is available to orders that match its distributor" do - o = create(:order, ship_address: create(:address), - distributor: sm.distributors.first, currency: currency) - sm.should be_available_to_order o - end - - it "is not available to orders that do not match its distributor" do - o = create(:order, ship_address: create(:address), - distributor: create(:distributor_enterprise), currency: currency) - sm.should_not be_available_to_order o - end - - it "is available to orders with no shipping address" do - o = create(:order, ship_address: nil, - distributor: sm.distributors.first, currency: currency) - sm.should be_available_to_order o - end - end - describe "finding services offered by all distributors" do let!(:d1) { create(:distributor_enterprise) } let!(:d2) { create(:distributor_enterprise) }