Sha256: 64a654146fb6d613193652bce77ec73745c8fccd6f6b759c3a97e62fdbdbab61

Contents?: true

Size: 658 Bytes

Versions: 60

Compression:

Stored size: 658 Bytes

Contents

require 'spec_helper.rb'

describe Paypal::Payment::Response::Payer do
  let :keys do
    Paypal::Payment::Response::Payer.optional_attributes
  end

  describe '.new' do
    it 'should allow nil for attributes' do
      payer = Paypal::Payment::Response::Payer.new
      keys.each do |key|
        payer.send(key).should be_nil
      end
    end

    it 'should treat all attributes as String' do
      attributes = keys.inject({}) do |attributes, key|
        attributes.merge!(key => "xyz")
      end
      payer = Paypal::Payment::Response::Payer.new attributes
      keys.each do |key|
        payer.send(key).should == "xyz"
      end
    end
  end
end

Version data entries

60 entries across 60 versions & 3 rubygems

Version Path
creative-paypal-express-1.4.1 spec/paypal/payment/response/payer_spec.rb
creative-paypal-express-1.4.0 spec/paypal/payment/response/payer_spec.rb
creative-paypal-express-1.3.0 spec/paypal/payment/response/payer_spec.rb
creative-paypal-express-1.2.1 spec/paypal/payment/response/payer_spec.rb
creative-paypal-express-1.2.0 spec/paypal/payment/response/payer_spec.rb
creative-paypal-express-1.1.0 spec/paypal/payment/response/payer_spec.rb
dfg-paypal-0.8.2 spec/paypal/payment/response/payer_spec.rb
creative-paypal-express-1.0.1.dev2 spec/paypal/payment/response/payer_spec.rb
creative-paypal-express-1.0.1.dev1 spec/paypal/payment/response/payer_spec.rb
creative-paypal-express-1.0.0 spec/paypal/payment/response/payer_spec.rb
creative-paypal-express-0.8.2.4 spec/paypal/payment/response/payer_spec.rb
creative-paypal-express-0.8.2.3 spec/paypal/payment/response/payer_spec.rb
creative-paypal-express-0.8.2.2 spec/paypal/payment/response/payer_spec.rb
creative-paypal-express-0.8.2.1 spec/paypal/payment/response/payer_spec.rb
creative-paypal-express-0.8.2 spec/paypal/payment/response/payer_spec.rb
creative-paypal-express-0.8.1 spec/paypal/payment/response/payer_spec.rb
paypal-express-0.8.1 spec/paypal/payment/response/payer_spec.rb
paypal-express-0.8.0 spec/paypal/payment/response/payer_spec.rb
paypal-express-0.7.1 spec/paypal/payment/response/payer_spec.rb
paypal-express-0.7.0 spec/paypal/payment/response/payer_spec.rb