Sha256: 24c509dc41abe393b7ff59684bb11bdf48ae3c3436cc35d8d9a04adbbbd11e3e

Contents?: true

Size: 998 Bytes

Versions: 8

Compression:

Stored size: 998 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 == Braintree::Transaction::Status::Authorized
    end
  end

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

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
braintree-2.6.0 spec/integration/braintree/test/transaction_amounts_spec.rb
braintree-2.5.2 spec/integration/braintree/test/transaction_amounts_spec.rb
braintree-2.5.1 spec/integration/braintree/test/transaction_amounts_spec.rb
braintree-2.4.0 spec/integration/braintree/test/transaction_amounts_spec.rb
braintree-2.3.1 spec/integration/braintree/test/transaction_amounts_spec.rb
braintree-2.2.0 spec/integration/braintree/test/transaction_amounts_spec.rb
braintree-2.1.0 spec/integration/braintree/test/transaction_amounts_spec.rb
braintree-2.0.0 spec/integration/braintree/test/transaction_amounts_spec.rb