Permalink
Browse files

Removed solo card since they dont exist anymore.

  • Loading branch information...
1 parent 5b09ec3 commit b9d67bc96befc821959863a5d878513f6bd2133a @overture8 overture8 committed Jun 7, 2011
Showing with 1 addition and 4 deletions.
  1. +1 −1 lib/credit_card_validator/validator.rb
  2. +0 −3 test/test_credit_card_validator.rb
@@ -2,7 +2,7 @@ module CreditCardValidator
CARD_TYPES = {
:visa => /^4[0-9]{12}(?:[0-9]{3})?$/,
:master_card => /^5[1-5][0-9]{14}$/,
- :maestro => /^(5[06-8]|6\d)\d{14}(\d{2,3})?$/,
+ :maestro => /(^6759[0-9]{2}([0-9]{10})$)|(^6759[0-9]{2}([0-9]{12})$)|(^6759[0-9]{2}([0-9]{13})$)/,
:diners_club => /^3(?:0[0-5]|[68][0-9])[0-9]{11}$/,
:amex => /^3[47][0-9]{13}$/,
:discover => /^6(?:011|5[0-9]{2})[0-9]{12}$/
@@ -14,9 +14,6 @@ def test_recognize_card_type
assert_equal 'diners_club', @v.card_type('30569309025904')
assert_equal 'amex', @v.card_type('371449635398431')
assert_equal 'discover', @v.card_type('6011000990139424')
-
- # Deals with switch and solo.
- assert_equal 'maestro', @v.card_type('633478111298873700')
assert_equal 'maestro', @v.card_type('6759671431256542')
end

0 comments on commit b9d67bc

Please sign in to comment.