Sha256: fe9e8a4545de5274800ba4b9381b8992ccc4ab7e03ae5a705b10e803b37a442f

Contents?: true

Size: 568 Bytes

Versions: 10

Compression:

Stored size: 568 Bytes

Contents

# frozen_string_literal: true

require 'spec_helper'

RSpec.describe SolidusBolt::Handlers::VoidHandler do
  subject(:void) { described_class.call(params) }

  let(:payment) { create(:bolt_payment, response_code: 'V2YW-NYNR-2MYM') }
  let(:params) { { data: { reference: payment.response_code } } }

  before do
    allow(SolidusBolt::Payments::VoidSyncService).to receive(:call).with(payment: payment)
    void
  end

  it 'calls the payment void service' do
    expect(SolidusBolt::Payments::VoidSyncService).to have_received(:call).with(payment: payment)
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
solidus_bolt-0.7.2 spec/webhooks/solidus_bolt/handlers/void_handler_spec.rb
solidus_bolt-0.7.1 spec/webhooks/solidus_bolt/handlers/void_handler_spec.rb
solidus_bolt-0.7.0 spec/webhooks/solidus_bolt/handlers/void_handler_spec.rb
solidus_bolt-0.6.0 spec/webhooks/solidus_bolt/handlers/void_handler_spec.rb
solidus_bolt-0.5.0 spec/webhooks/solidus_bolt/handlers/void_handler_spec.rb
solidus_bolt-0.4.0 spec/webhooks/solidus_bolt/handlers/void_handler_spec.rb
solidus_bolt-0.3.0 spec/webhooks/solidus_bolt/handlers/void_handler_spec.rb
solidus_bolt-0.2.0 spec/webhooks/solidus_bolt/handlers/void_handler_spec.rb
solidus_bolt-0.1.0 spec/webhooks/solidus_bolt/handlers/void_handler_spec.rb
solidus_bolt-0.0.1 spec/webhooks/solidus_bolt/handlers/void_handler_spec.rb