Skip to content

Commit b420480

Browse files
committed
add tests for new mastercard BIN ranges
stripe-archive/jquery.payment@47dbab4
1 parent 7f36b80 commit b420480

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

test/cardType_spec.coffee

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ describe 'payform', ->
1111
topic = payform.parseCardType '5555555555554444'
1212
assert.equal topic, 'mastercard'
1313

14+
it 'that begins with 2 should return MasterCard', ->
15+
topic = payform.parseCardType '2221000002222221'
16+
assert.equal topic, 'mastercard'
17+
1418
it 'that begins with 34 should return American Express', ->
1519
topic = payform.parseCardType '3412121212121212'
1620
assert.equal topic, 'amex'
@@ -40,6 +44,7 @@ describe 'payform', ->
4044

4145
assert.equal(payform.parseCardType('5555555555554444'), 'mastercard')
4246
assert.equal(payform.parseCardType('5454545454545454'), 'mastercard')
47+
assert.equal(payform.parseCardType('2221000002222221'), 'mastercard')
4348

4449
assert.equal(payform.parseCardType('378282246310005'), 'amex')
4550
assert.equal(payform.parseCardType('371449635398431'), 'amex')

0 commit comments

Comments
 (0)