Sha256: 2e666d1ab87cc002128055c204ebeabec37708373cb1e7049274e5c4d5a10189

Contents?: true

Size: 714 Bytes

Versions: 7

Compression:

Stored size: 714 Bytes

Contents

require 'spec_helper.rb'

describe Paypal::Payment::Response::Refund do
  let :attributes do
    {
      transaction_id: '0000000000000000L',
      refund_status: 'Instant'
    }
  end

  describe '.new' do
    subject { Paypal::Payment::Response::Refund.new(attributes) }

    describe '#transaction_id' do
      subject { super().transaction_id }
      it { is_expected.to eq '0000000000000000L' }
    end

    it 'stores refund information in info' do
      info = double(Paypal::Payment::Response::RefundInfo)
      expect(Paypal::Payment::Response::RefundInfo)
        .to receive(:new)
        .with(refund_status: 'Instant')
        .and_return(info)
      expect(subject.info).to eq info
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
ianfleeton-paypal-express-1.0.0 spec/paypal/payment/response/refund_spec.rb
ianfleeton-paypal-express-0.8.7 spec/paypal/payment/response/refund_spec.rb
ianfleeton-paypal-express-0.8.6 spec/paypal/payment/response/refund_spec.rb
ianfleeton-paypal-express-0.8.5 spec/paypal/payment/response/refund_spec.rb
ianfleeton-paypal-express-0.8.4 spec/paypal/payment/response/refund_spec.rb
ianfleeton-paypal-express-0.8.3 spec/paypal/payment/response/refund_spec.rb
ianfleeton-paypal-express-0.8.2 spec/paypal/payment/response/refund_spec.rb