summaryrefslogtreecommitdiff
path: root/spec/jobs/solidus_subscriptions/process_installment_job_spec.rb
blob: 4a33819cbbf94273f5aadc864eaa4f8a91d7dfcb (plain)
1
2
3
4
5
6
7
8
9
10
11
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