Sha256: b2cc60c9e1b262b477f334585ef150585d8a69fc00c395a70d58482b6f0a1b0f

Contents?: true

Size: 1 KB

Versions: 9

Compression:

Stored size: 1 KB

Contents

require File.expand_path(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"
        },
      )
      expect(transaction.status).to eq(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"
        },
      )
      expect(result.transaction.status).to eq(Braintree::Transaction::Status::ProcessorDeclined)
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

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