Sha256: d6f9c67d65856558e4c725a128cad9aacc44ecd921a2bcf242cc4f22659c435b
Contents?: true
Size: 1.15 KB
Versions: 18
Compression:
Stored size: 1.15 KB
Contents
require 'spec_helper' RSpec.describe RockRMS::Client::PaymentDetail, type: :model do include_context 'resource specs' describe '#list_payment_details' do it 'returns a array' do resource = client.list_payment_details expect(resource).to be_a(Array) expect(resource.first).to be_a(Hash) end end describe '#create_payment_detail' do subject(:resource) do client.create_payment_detail(payment_type: 'card', card_type: 'amex') end it 'returns integer' do expect(resource).to be_a(Integer) end it 'passes options' do expect(client).to receive(:post) .with( 'FinancialPaymentDetails', { 'CurrencyTypeValueId' => 156, 'CreditCardTypeValueId' => 159, 'ForeignKey' => nil } ) .and_call_original resource end end describe '#delete_payment_detail' do it 'returns nothing' do expect(client.delete_payment_detail(123)).to eq(nil) end it 'passes id' do expect(client).to receive(:delete).with('FinancialPaymentDetails/123') client.delete_payment_detail(123) end end end
Version data entries
18 entries across 18 versions & 1 rubygems