Sha256: cc07b9fdfab5c0a2d31a4a0473530350992716286effd094b06407f01a0c46fb

Contents?: true

Size: 689 Bytes

Versions: 7

Compression:

Stored size: 689 Bytes

Contents

require 'spec_helper.rb'

describe Paypal::Payment::Response do
  describe '.new' do
    let :attributes do
      {
        CUSTOM: 'custom'
      }
    end

    subject { Paypal::Payment::Response.new(attributes) }

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

    context 'when non-supported attributes are given' do
      it 'should ignore them and warn' do
        expect(Paypal.logger).to receive(:warn).with(
          "Ignored Parameter (Paypal::Payment::Response): ignored=Ignore me!"
        )
        response = Paypal::Payment::Response.new(
          :ignored => 'Ignore me!'
        )
      end
    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_spec.rb
ianfleeton-paypal-express-0.8.7 spec/paypal/payment/response_spec.rb
ianfleeton-paypal-express-0.8.6 spec/paypal/payment/response_spec.rb
ianfleeton-paypal-express-0.8.5 spec/paypal/payment/response_spec.rb
ianfleeton-paypal-express-0.8.4 spec/paypal/payment/response_spec.rb
ianfleeton-paypal-express-0.8.3 spec/paypal/payment/response_spec.rb
ianfleeton-paypal-express-0.8.2 spec/paypal/payment/response_spec.rb