diff --git a/core/app/models/spree/null_promotion_handler.rb b/core/app/models/spree/null_promotion_handler.rb index f40087f745a..f1a7d0b5a11 100644 --- a/core/app/models/spree/null_promotion_handler.rb +++ b/core/app/models/spree/null_promotion_handler.rb @@ -12,7 +12,10 @@ def initialize(order) def activate @order end - alias_method :apply, :activate + + def apply + self + end def can_apply? true diff --git a/core/spec/models/spree/null_promotion_handler_spec.rb b/core/spec/models/spree/null_promotion_handler_spec.rb index 8de56a305c6..9d09f15c3c2 100644 --- a/core/spec/models/spree/null_promotion_handler_spec.rb +++ b/core/spec/models/spree/null_promotion_handler_spec.rb @@ -17,8 +17,9 @@ describe "#apply" do subject(:activate) { handler.apply } - it "returns the unchanged order" do - expect(activate).to eq(order) + it "returns the handler with the unchanged order" do + expect(activate).to eq(handler) + expect(activate.order).to eq(order) end end