Sha256: 4cc4ef10071f79edc14bd5f1768aba3402e6d881a08c4e2cc57191e8be1b2e0a

Contents?: true

Size: 570 Bytes

Versions: 16

Compression:

Stored size: 570 Bytes

Contents

require File.expand_path(File.dirname(__FILE__) + "/../spec_helper")

describe Braintree::ErrorCodes do
  describe Braintree::ErrorCodes::CreditCard do
    it "returns CardholderNameIsTooLong when cardholder name is too long" do
      result = Braintree::Customer.create(
        :credit_card => {
          :cardholder_name => "x" * 256
        },
      )
      result.success?.should == false
      result.errors.for(:customer).for(:credit_card).map { |e| e.code }.should \
        include(Braintree::ErrorCodes::CreditCard::CardholderNameIsTooLong)
    end
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
braintree-4.14.0 spec/integration/braintree/error_codes_spec.rb
braintree-4.13.0 spec/integration/braintree/error_codes_spec.rb
braintree-4.12.0 spec/integration/braintree/error_codes_spec.rb
braintree-4.11.0 spec/integration/braintree/error_codes_spec.rb
braintree-4.10.0 spec/integration/braintree/error_codes_spec.rb
braintree-4.9.0 spec/integration/braintree/error_codes_spec.rb
braintree-4.8.0 spec/integration/braintree/error_codes_spec.rb
braintree-4.7.0 spec/integration/braintree/error_codes_spec.rb
braintree-4.6.0 spec/integration/braintree/error_codes_spec.rb
braintree-4.5.0 spec/integration/braintree/error_codes_spec.rb
braintree-4.4.0 spec/integration/braintree/error_codes_spec.rb
braintree-4.3.0 spec/integration/braintree/error_codes_spec.rb
braintree-4.2.0 spec/integration/braintree/error_codes_spec.rb
braintree-4.1.0 spec/integration/braintree/error_codes_spec.rb
braintree-4.0.0 spec/integration/braintree/error_codes_spec.rb
braintree-3.4.0 spec/integration/braintree/error_codes_spec.rb