diff --git a/app/models/spree/order.rb b/app/models/spree/order.rb index 900cf0fe76..85e39d5cbb 100644 --- a/app/models/spree/order.rb +++ b/app/models/spree/order.rb @@ -534,11 +534,6 @@ module Spree shipments.destroy_all end - def clear_adjustments! - adjustments.destroy_all - line_item_adjustments.destroy_all - end - def state_changed(name) state = "#{name}_state" return unless persisted? diff --git a/spec/models/spree/order/adjustments_spec.rb b/spec/models/spree/order/adjustments_spec.rb index 6b327f464e..11c4cd9797 100644 --- a/spec/models/spree/order/adjustments_spec.rb +++ b/spec/models/spree/order/adjustments_spec.rb @@ -5,22 +5,6 @@ require 'spec_helper' describe Spree::Order do let(:order) { Spree::Order.new } - context "clear_adjustments" do - let(:adjustment) { double("Adjustment") } - - it "destroys all order adjustments" do - allow(order).to receive_messages(adjustments: adjustment) - expect(adjustment).to receive(:destroy_all) - order.clear_adjustments! - end - - it "destroy all line item adjustments" do - allow(order).to receive_messages(line_item_adjustments: adjustment) - expect(adjustment).to receive(:destroy_all) - order.clear_adjustments! - end - end - context "totaling adjustments" do let!(:adjustment1) { create(:adjustment, amount: 5) } let!(:adjustment2) { create(:adjustment, amount: 10) }