Sha256: 56143ca17fa2313b4c5ec6efc3e61f927bdbe2f83082cb572bbab5bce3371d5f

Contents?: true

Size: 1.07 KB

Versions: 27

Compression:

Stored size: 1.07 KB

Contents

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

describe Braintree::Transaction::Installment do
  describe "inspect" do
    it "assigns all fields" do
      adjustment_attributes = {
        :amount => "0.98",
        :kind => "REFUND",
        :projected_disbursement_date => "2020-01-03 01:02:03Z",
        :actual_disbursement_date => "2020-01-04 01:02:03Z",
      }
      installment_attributes = {
        :id => "abc123",
        :amount => "1.23",
        :projected_disbursement_date => "2020-01-01 01:02:03Z",
        :actual_disbursement_date => "2020-01-02 01:02:03Z",
        :adjustments => [adjustment_attributes],
      }

      installment = Braintree::Transaction::Installment.new(installment_attributes)

      expect(installment.inspect).to eq('#<id: "abc123", amount: 0.123e1, projected_disbursement_date: "2020-01-01 01:02:03Z", actual_disbursement_date: "2020-01-02 01:02:03Z", adjustments: [#<amount: 0.98e0, kind: "REFUND", projected_disbursement_date: "2020-01-03 01:02:03Z", actual_disbursement_date: "2020-01-04 01:02:03Z">]>')
    end
  end
end

Version data entries

27 entries across 27 versions & 1 rubygems

Version Path
braintree-4.23.0 spec/unit/braintree/transaction/installment_spec.rb
braintree-4.22.0 spec/unit/braintree/transaction/installment_spec.rb
braintree-4.21.0 spec/unit/braintree/transaction/installment_spec.rb
braintree-4.20.0 spec/unit/braintree/transaction/installment_spec.rb
braintree-4.19.0 spec/unit/braintree/transaction/installment_spec.rb
braintree-4.18.0 spec/unit/braintree/transaction/installment_spec.rb
braintree-4.17.0 spec/unit/braintree/transaction/installment_spec.rb
braintree-4.16.0 spec/unit/braintree/transaction/installment_spec.rb
braintree-4.15.0 spec/unit/braintree/transaction/installment_spec.rb
braintree-4.14.0 spec/unit/braintree/transaction/installment_spec.rb
braintree-4.13.0 spec/unit/braintree/transaction/installment_spec.rb
braintree-4.12.0 spec/unit/braintree/transaction/installment_spec.rb
braintree-4.11.0 spec/unit/braintree/transaction/installment_spec.rb
braintree-4.10.0 spec/unit/braintree/transaction/installment_spec.rb
braintree-4.9.0 spec/unit/braintree/transaction/installment_spec.rb
braintree-4.8.0 spec/unit/braintree/transaction/installment_spec.rb
braintree-4.7.0 spec/unit/braintree/transaction/installment_spec.rb
braintree-4.6.0 spec/unit/braintree/transaction/installment_spec.rb
braintree-4.5.0 spec/unit/braintree/transaction/installment_spec.rb
braintree-4.4.0 spec/unit/braintree/transaction/installment_spec.rb