Sha256: d85f0dc22c1acfb9686d022afaa3baad56007236813b24a3506932b2b3bb389a

Contents?: true

Size: 938 Bytes

Versions: 7

Compression:

Stored size: 938 Bytes

Contents

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

describe Braintree::Test::TransactionAmounts do
  describe "Authorize" do
    it "creates a transaction with status authorized" do
      transaction = Braintree::Transaction.sale!(
        :amount => Braintree::Test::TransactionAmounts::Authorize,
        :credit_card => {
          :number => Braintree::Test::CreditCardNumbers::Visa,
          :expiration_date => "12/2012"
        }
      )
      transaction.status.should == "authorized"
    end
  end

  describe "Decline" do
    it "creates a transaction with status processor_declined" do
      transaction = Braintree::Transaction.sale!(
        :amount => Braintree::Test::TransactionAmounts::Decline,
        :credit_card => {
          :number => Braintree::Test::CreditCardNumbers::Visa,
          :expiration_date => "12/2012"
        }
      )
      transaction.status.should == "processor_declined"
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
braintree-1.2.0 spec/integration/braintree/test/transaction_amounts_spec.rb
braintree-1.1.3 spec/integration/braintree/test/transaction_amounts_spec.rb
braintree-1.1.2 spec/integration/braintree/test/transaction_amounts_spec.rb
braintree-1.1.1 spec/integration/braintree/test/transaction_amounts_spec.rb
braintree-1.1.0 spec/integration/braintree/test/transaction_amounts_spec.rb
braintree-1.0.1 spec/integration/braintree/test/transaction_amounts_spec.rb
braintree-1.0.0 spec/integration/braintree/test/transaction_amounts_spec.rb