Sha256: 977f47a0fd5ba0d4d964dfea4e1ad4fe9c12b251c5f8b942852e3e43dee6a13f

Contents?: true

Size: 1.02 KB

Versions: 1

Compression:

Stored size: 1.02 KB

Contents

require_relative '../../spec_helper'

describe MangoPay::PayIn::Card::Web, type: :feature do
  include_context 'users'
  include_context 'wallets'
  include_context 'payin_card_web'

  describe 'CREATE' do
    it 'creates a card web payin' do
      expect(new_payin_card_web['Id']).not_to be_nil
      #expect(new_payin_card_web['Status']).to eq('SUCCEEDED') # cannot test yet
      expect(new_payin_card_web['Status']).to eq('CREATED')
    end
  end

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

  describe 'REFUND' do
    it 'refunds a payin' do
      payin_refund = MangoPay::PayIn.refund(new_payin_card_web['Id'], {
        AuthorId: new_payin_card_web['AuthorId']
      })
      expect(payin_refund['Id']).not_to be_nil
      #expect(payin_refund['Status']).to eq('SUCCEEDED') # cannot test yet
      expect(payin_refund['Status']).to be_nil
    end
  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
mangopay-3.0.1 spec/lib/mangopay/payin_spec.rb