Sha256: 9b1d2eebbbe098d7dd277a3358d5bb5cb7e4fdd0566949c9d1bbaf0474f56b07
Contents?: true
Size: 1.68 KB
Versions: 2
Compression:
Stored size: 1.68 KB
Contents
describe MangoPay::VirtualAccount do include_context 'virtual_account' include_context 'wallets' describe 'CREATE' do it 'can create a Virtual Account' do wallet = new_wallet virtual_account = new_virtual_account(wallet['Id']) expect(virtual_account).not_to be_nil end end describe 'DEACTIVATE' do it 'deactivates a Virtual Account' do wallet = new_wallet virtual_account = new_virtual_account(wallet['Id']) deactivated = MangoPay::VirtualAccount.deactivate(wallet['Id'], virtual_account['Id']) expect(deactivated).not_to be_nil expect(deactivated['Status']).to eq 'CLOSED' expect(deactivated['Id']).to eq(virtual_account['Id']) end end describe 'FETCH' do it 'can get a Virtual Account' do wallet = new_wallet virtual_account = new_virtual_account(wallet['Id']) fetched = MangoPay::VirtualAccount.fetch(wallet['Id'], virtual_account['Id']) expect(fetched).not_to be_nil expect(fetched['Id']).to eq(virtual_account['Id']) end end describe 'FETCH ALL' do it 'can get all Virtual Accounts for a wallet' do wallet = new_wallet virtual_account = new_virtual_account(wallet['Id']) fetched_list = MangoPay::VirtualAccount.fetch_all(wallet['Id']) expect(fetched_list).not_to be_nil expect(fetched_list[0]['Id']).to eq(virtual_account['Id']) end end describe 'FETCH AVAILABILITIES' do it 'get availabilities' do availabilities = MangoPay::VirtualAccount.fetch_availabilities expect(availabilities).not_to be_nil expect(availabilities['Collection']).not_to be_nil expect(availabilities['UserOwned']).not_to be_nil end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
mangopay-3.28.0 | spec/mangopay/virtual_account_spec.rb |
mangopay-3.27.0 | spec/mangopay/virtual_account_spec.rb |