Sha256: 1d2fbbee7bb849f12e0f5edfa846a7ce3bacd739f88b58cbd950c7b9a71c7f55

Contents?: true

Size: 870 Bytes

Versions: 6

Compression:

Stored size: 870 Bytes

Contents

describe MangoPay::PayIn::Bancontact::Web, type: :feature do
  include_context 'wallets'
  include_context 'payins'

  def check_type_and_status(payin)
    expect(payin['Type']).to eq('PAYIN')
    expect(payin['Nature']).to eq('REGULAR')
    expect(payin['PaymentType']).to eq('BCMC')
    expect(payin['ExecutionType']).to eq('WEB')
    expect(payin['Status']).to eq('CREATED')
  end

  describe 'CREATE' do
    it 'creates a bancontact web payin' do
      created = new_payin_bancontact_web
      expect(created['Id']).not_to be_nil
      check_type_and_status(created)
    end
  end

  describe 'FETCH' do
    it 'fetches a payin' do
      created = new_payin_bancontact_web
      fetched = MangoPay::PayIn.fetch(created['Id'])
      expect(fetched['Id']).to eq(created['Id'])
      check_type_and_status(created)
      check_type_and_status(fetched)
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
mangopay-3.28.2 spec/mangopay/payin_bancontact_web_spec.rb
mangopay-3.28.1 spec/mangopay/payin_bancontact_web_spec.rb
mangopay-3.28.0 spec/mangopay/payin_bancontact_web_spec.rb
mangopay-3.27.0 spec/mangopay/payin_bancontact_web_spec.rb
mangopay-3.26.1 spec/mangopay/payin_bancontact_web_spec.rb
mangopay-3.26.0 spec/mangopay/payin_bancontact_web_spec.rb