spec/integration/braintree/transaction_spec.rb in braintree-2.28.0 vs spec/integration/braintree/transaction_spec.rb in braintree-2.29.0

- old
+ new

@@ -169,10 +169,31 @@ ) result.success?.should == true end + it "accepts billing_address_id in place of billing_address" do + result = Braintree::Customer.create() + address_result = Braintree::Address.create( + :customer_id => result.customer.id, + :country_code_alpha2 => "US" + ) + + result = Braintree::Transaction.create( + :type => "sale", + :amount => Braintree::Test::TransactionAmounts::Authorize, + :customer_id => result.customer.id, + :billing_address_id => address_result.address.id, + :credit_card => { + :number => Braintree::Test::CreditCardNumbers::Visa, + :expiration_date => "05/2009" + } + ) + + result.success?.should == true + end + it "returns processor response code and text if declined" do result = Braintree::Transaction.create( :type => "sale", :amount => Braintree::Test::TransactionAmounts::Decline, :credit_card => { @@ -2033,9 +2054,10 @@ disbursement.disbursement_date.should == "2013-04-10" disbursement.settlement_amount.should == "100.00" disbursement.settlement_currency_iso_code.should == "USD" disbursement.settlement_currency_exchange_rate.should == "1" disbursement.funds_held?.should == false + disbursement.success?.should be_true end it "is not disbursed" do result = Braintree::Transaction.create( :type => "sale",