summaryrefslogtreecommitdiff
path: root/spec/jobs/solidus_subscriptions/process_installment_job_spec.rb
blob: 01df9d4568c9cb73bcd78c781b9a0cc563b1942c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
# frozen_string_literal: true

RSpec.describe SolidusSubscriptions::ProcessInstallmentJob do
  it 'processes checkout for the installment' do
    installment = build_stubbed(:installment)
    checkout = instance_spy(SolidusSubscriptions::Checkout)
    allow(SolidusSubscriptions::Checkout).to receive(:new).with(installment).and_return(checkout)

    described_class.perform_now(installment)

    expect(checkout).to have_received(:process)
  end
end