Sha256: 41e0950a2bc2fcef37037df503be7caee7976a6cc58135521df054cd064fe3d9
Contents?: true
Size: 1.05 KB
Versions: 2
Compression:
Stored size: 1.05 KB
Contents
require File.expand_path(File.dirname(__FILE__) + "/../spec_helper") describe Braintree::CreditCardVerification, "search" do describe "self.find" do it "finds the verification with the given id" do result = Braintree::Customer.create( :credit_card => { :cardholder_name => "Tom Smith", :expiration_date => "05/2012", :number => Braintree::Test::CreditCardNumbers::FailsSandboxVerification::Visa, :options => { :verify_card => true } }) created_verification = result.credit_card_verification found_verification = Braintree::CreditCardVerification.find(created_verification.id) found_verification.should == created_verification found_verification.credit_card.should == created_verification.credit_card end it "raises a NotFoundError exception if verification cannot be found" do expect do Braintree::CreditCardVerification.find("invalid-id") end.to raise_error(Braintree::NotFoundError, 'verification with id "invalid-id" not found') end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
braintree-2.20.0 | spec/integration/braintree/credit_card_verification_spec.rb |
braintree-2.19.0 | spec/integration/braintree/credit_card_verification_spec.rb |