Sha256: e12185229fa6c0b6eb7af99be7785868bf2496b944cccd217c0e88f1d7ea3183

Contents?: true

Size: 1.06 KB

Versions: 9

Compression:

Stored size: 1.06 KB

Contents

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

describe Braintree::Disbursement do
  describe "transactions" do
    it "finds the transactions associated with the disbursement" do
      attributes = {
        :id => "123456",
        :merchant_account => {
          :id => "sandbox_sub_merchant_account",
          :master_merchant_account => {
            :id => "sandbox_master_merchant_account",
            :status => "active"
          },
          :status => "active"
        },
        :transaction_ids => ["sub_merchant_transaction"],
        :amount => "100.00",
        :disbursement_date => "2013-04-10",
        :exception_message => "invalid_account_number",
        :follow_up_action => "update",
        :retry => false,
        :success => false
      }

      disbursement = Braintree::Disbursement._new(Braintree::Configuration.gateway, attributes)
      expect(disbursement.transactions.maximum_size).to eq(1)
      transaction = disbursement.transactions.first
      expect(transaction.id).to eq("sub_merchant_transaction")
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
braintree-4.23.0 spec/integration/braintree/disbursement_spec.rb
braintree-4.22.0 spec/integration/braintree/disbursement_spec.rb
braintree-4.21.0 spec/integration/braintree/disbursement_spec.rb
braintree-4.20.0 spec/integration/braintree/disbursement_spec.rb
braintree-4.19.0 spec/integration/braintree/disbursement_spec.rb
braintree-4.18.0 spec/integration/braintree/disbursement_spec.rb
braintree-4.17.0 spec/integration/braintree/disbursement_spec.rb
braintree-4.16.0 spec/integration/braintree/disbursement_spec.rb
braintree-4.15.0 spec/integration/braintree/disbursement_spec.rb