Sha256: c24fbdf7179973f9660b9dcc43286cf5bc6f5cce1c11e51803b09334e25034c2

Contents?: true

Size: 997 Bytes

Versions: 1

Compression:

Stored size: 997 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
      transaction = Braintree::Transaction.sale!(
        :amount => Braintree::Test::TransactionAmounts::Decline,
        :credit_card => {
          :number => Braintree::Test::CreditCardNumbers::Visa,
          :expiration_date => "12/2012"
        }
      )
      transaction.status.should == Braintree::Transaction::Status::ProcessorDeclined
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
braintree-1.2.1 spec/integration/braintree/test/transaction_amounts_spec.rb