Sha256: 9529ad582f381015eece27fd8fdb9721b9028d3ef3aa4c2f9e76bf27d18fc901

Contents?: true

Size: 915 Bytes

Versions: 1

Compression:

Stored size: 915 Bytes

Contents

describe MangoPay::PayIn::Mbway::Direct, 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('MBWAY')
    expect(payin['ExecutionType']).to eq('DIRECT')
    expect(payin['Status']).to eq('CREATED')
  end

  describe 'CREATE' do
    it 'creates a mbway direct payin' do
      created = new_payin_mbway_direct
      expect(created['Id']).not_to be_nil
      expect(created['Phone']).not_to be_nil
      check_type_and_status(created)
    end
  end

  describe 'FETCH' do
    it 'fetches a payin' do
      created = new_payin_mbway_direct
      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

1 entries across 1 versions & 1 rubygems

Version Path
mangopay-3.15.0 spec/mangopay/payin_mbway_direct_spec.rb