Sha256: 6f013ea0e674955e0ff9295b1fd4e3e99360a1b7be79b50b4fcd21e0f07c107a

Contents?: true

Size: 911 Bytes

Versions: 16

Compression:

Stored size: 911 Bytes

Contents

require File.expand_path(File.dirname(__FILE__) + "/../../spec_helper")

describe Braintree::Transaction::LiabilityShift do
  describe "#initialize" do
    it "sets responsible party and conditions" do
      liability_shift = Braintree::Transaction::LiabilityShift.new(
        :responsible_party => "paypal",
        :conditions => ["unauthorized","item_not_received"],
      )

      expect(liability_shift.responsible_party).to eql "paypal"
      expect(liability_shift.conditions.first).to eql "unauthorized"
    end
  end

  describe "inspect" do
    it "prints the attributes" do
      details = Braintree::Transaction::LiabilityShift.new(
        :responsible_party => "paypal",
        :conditions => ["unauthorized","item_not_received"],
      )

      expect(details.inspect).to eql %(#<LiabilityShift responsible_party: "paypal", conditions: ["unauthorized", "item_not_received"]>)
    end
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
braintree-4.23.0 spec/unit/braintree/risk_data/liability_shift.rb
braintree-4.22.0 spec/unit/braintree/risk_data/liability_shift.rb
braintree-4.21.0 spec/unit/braintree/risk_data/liability_shift.rb
braintree-4.20.0 spec/unit/braintree/risk_data/liability_shift.rb
braintree-4.19.0 spec/unit/braintree/risk_data/liability_shift.rb
braintree-4.18.0 spec/unit/braintree/risk_data/liability_shift.rb
braintree-4.17.0 spec/unit/braintree/risk_data/liability_shift.rb
braintree-4.16.0 spec/unit/braintree/risk_data/liability_shift.rb
braintree-4.15.0 spec/unit/braintree/risk_data/liability_shift.rb
braintree-4.14.0 spec/unit/braintree/risk_data/liability_shift.rb
braintree-4.13.0 spec/unit/braintree/risk_data/liability_shift.rb
braintree-4.12.0 spec/unit/braintree/risk_data/liability_shift.rb
braintree-4.11.0 spec/unit/braintree/risk_data/liability_shift.rb
braintree-4.10.0 spec/unit/braintree/risk_data/liability_shift.rb
braintree-4.9.0 spec/unit/braintree/risk_data/liability_shift.rb
braintree-4.8.0 spec/unit/braintree/risk_data/liability_shift.rb