Sha256: 0534eee0be6fd768b5c716c4e6c6861f766804f8959dbf7a576caec3b557551e
Contents?: true
Size: 582 Bytes
Versions: 10
Compression:
Stored size: 582 Bytes
Contents
# frozen_string_literal: true require 'spec_helper' RSpec.describe SolidusBolt::Payments::VoidSyncService do subject(:void) { described_class.call(payment: payment) } let(:payment) { create(:bolt_payment) } describe '#call' do context 'when non-void payment' do it 'voids the payment' do expect { void }.to change { payment.reload.state }.from('checkout').to('void') end end context 'when void payment' do before { payment.update(state: 'void') } it 'returns nil' do expect(void).to be_nil end end end end
Version data entries
10 entries across 10 versions & 1 rubygems