Sha256: cdd670ef29ae374900d4195d52fc4c6f408b7740a6be2c3a95877fecde5916e5

Contents?: true

Size: 551 Bytes

Versions: 15

Compression:

Stored size: 551 Bytes

Contents

require 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

15 entries across 15 versions & 1 rubygems

Version Path
braintree-2.6.0 spec/integration/braintree/error_codes_spec.rb
braintree-2.5.2 spec/integration/braintree/error_codes_spec.rb
braintree-2.5.1 spec/integration/braintree/error_codes_spec.rb
braintree-2.4.0 spec/integration/braintree/error_codes_spec.rb
braintree-2.3.1 spec/integration/braintree/error_codes_spec.rb
braintree-2.2.0 spec/integration/braintree/error_codes_spec.rb
braintree-2.1.0 spec/integration/braintree/error_codes_spec.rb
braintree-2.0.0 spec/integration/braintree/error_codes_spec.rb
braintree-1.2.1 spec/integration/braintree/error_codes_spec.rb
braintree-1.2.0 spec/integration/braintree/error_codes_spec.rb
braintree-1.1.3 spec/integration/braintree/error_codes_spec.rb
braintree-1.1.2 spec/integration/braintree/error_codes_spec.rb
braintree-1.1.1 spec/integration/braintree/error_codes_spec.rb
braintree-1.1.0 spec/integration/braintree/error_codes_spec.rb
braintree-1.0.1 spec/integration/braintree/error_codes_spec.rb