Sha256: be9066a9062b1eb12a584dd0fffb64d4a48d4493157365125e19eea101958bdf

Contents?: true

Size: 558 Bytes

Versions: 6

Compression:

Stored size: 558 Bytes

Contents

require "spec_helper"

describe PayPal::Recurring::Response do
  let(:response_class) { Class.new(PayPal::Recurring::Response::Base) }

  describe ".mapping" do
    it "returns single item mapping" do
      response_class.mapping :foo => :bar
      response = response_class.new(stub(:body => "bar=foo"))
      response.foo.should == "foo"
    end

    it "returns item from array mapping" do
      response_class.mapping :foo => [:bar, :zaz]
      response = response_class.new(stub(:body => "zaz=foo"))
      response.foo.should == "foo"
    end
  end
end

Version data entries

6 entries across 6 versions & 2 rubygems

Version Path
didil-paypal-recurring-1.1.1 spec/paypal/response/base_spec.rb
paypal-recurring-1.1.0 spec/paypal/response/base_spec.rb
paypal-recurring-1.0.0 spec/paypal/response/base_spec.rb
paypal-recurring-0.1.6 spec/paypal/response/base_spec.rb
paypal-recurring-0.1.5 spec/paypal/response/base_spec.rb
paypal-recurring-0.1.4 spec/paypal/response/base_spec.rb