Sha256: 7fab7af2870e2652cab507fb290cfb2231cef386a89837916065f4f769c73afd
Contents?: true
Size: 705 Bytes
Versions: 1
Compression:
Stored size: 705 Bytes
Contents
require 'spec_helper' describe "Braintree::CreditCard.find" do it "gets the correct credit card" do credit_card = Braintree::CreditCard.find(token) credit_card.last_4.should == TEST_CC_NUMBER[-4,4] credit_card.expiration_month.should == month credit_card.expiration_year.should == year end let(:month) { '04' } let(:year) { '2016' } let(:token) { braintree_credit_card_token(TEST_CC_NUMBER, [month, year].join('/')) } end describe "Braintree::CreditCard.sale" do it "successfully creates a sale" do result = Braintree::CreditCard.sale(cc_token, :amount => 10.00) result.should be_success Braintree::Transaction.find(result.transaction.id).should be end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
fake_braintree-0.1.0 | spec/fake_braintree/credit_card_spec.rb |