From 0bbe05bea786e791064a29e8657296e881be2aed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Busqu=C3=A9?= Date: Tue, 24 May 2022 07:23:12 +0200 Subject: [PATCH] Fix warning due to calling deprecated method See https://github.com/solidusio/solidus/pull/4260 --- .../spree/order/finalize_creates_subscriptions.rb | 2 +- .../spree/order/finalize_creates_subscriptions_spec.rb | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/decorators/models/solidus_subscriptions/spree/order/finalize_creates_subscriptions.rb b/app/decorators/models/solidus_subscriptions/spree/order/finalize_creates_subscriptions.rb index 3f83b822..bdc4ca04 100644 --- a/app/decorators/models/solidus_subscriptions/spree/order/finalize_creates_subscriptions.rb +++ b/app/decorators/models/solidus_subscriptions/spree/order/finalize_creates_subscriptions.rb @@ -8,7 +8,7 @@ module SolidusSubscriptions module Spree module Order module FinalizeCreatesSubscriptions - def finalize! + def finalize SolidusSubscriptions::SubscriptionGenerator.group(subscription_line_items).each do |line_items| SolidusSubscriptions::SubscriptionGenerator.activate(line_items) end diff --git a/spec/decorators/models/solidus_subscriptions/spree/order/finalize_creates_subscriptions_spec.rb b/spec/decorators/models/solidus_subscriptions/spree/order/finalize_creates_subscriptions_spec.rb index 0ca34d93..e8263279 100644 --- a/spec/decorators/models/solidus_subscriptions/spree/order/finalize_creates_subscriptions_spec.rb +++ b/spec/decorators/models/solidus_subscriptions/spree/order/finalize_creates_subscriptions_spec.rb @@ -3,8 +3,8 @@ require 'spec_helper' RSpec.describe SolidusSubscriptions::Spree::Order::FinalizeCreatesSubscriptions do - describe '#finalize!' do - subject(:finalize) { order.finalize! } + describe '#finalize' do + subject(:finalize) { order.finalize } let(:order) { create :order, :with_subscription_line_items } let(:subscription_line_item) { order.subscription_line_items.last }