Sha256: ad501eae16622f725c0533715e53ba3d44b3bda0e339bc1e530606b76d66fb4d

Contents?: true

Size: 387 Bytes

Versions: 5

Compression:

Stored size: 387 Bytes

Contents

# frozen_string_literal: true

RSpec.describe SolidusSubscriptions::OrderSubscriber do
  describe 'on order completion' do
    it 'enqueues the CreateSubscriptionJob' do
      order = create(:order_ready_to_complete, :with_subscription_line_items)

      order.complete!

      expect(SolidusSubscriptions::CreateSubscriptionJob).to have_been_enqueued.with(order).once
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
solidus_subscriptions-2.0.2 spec/subscribers/solidus_subscriptions/order_subscriber_spec.rb
solidus_subscriptions-2.0.1 spec/subscribers/solidus_subscriptions/order_subscriber_spec.rb
solidus_subscriptions-2.0.0 spec/subscribers/solidus_subscriptions/order_subscriber_spec.rb
solidus_subscriptions-1.1.0 spec/subscribers/solidus_subscriptions/order_subscriber_spec.rb
solidus_subscriptions-1.0.1 spec/subscribers/solidus_subscriptions/order_subscriber_spec.rb