File tree Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,10 @@ describe 'payform', ->
11
11
topic = payform .parseCardType ' 5555555555554444'
12
12
assert .equal topic, ' mastercard'
13
13
14
+ it ' that begins with 2 should return MasterCard' , ->
15
+ topic = payform .parseCardType ' 2221000002222221'
16
+ assert .equal topic, ' mastercard'
17
+
14
18
it ' that begins with 34 should return American Express' , ->
15
19
topic = payform .parseCardType ' 3412121212121212'
16
20
assert .equal topic, ' amex'
@@ -40,6 +44,7 @@ describe 'payform', ->
40
44
41
45
assert .equal (payform .parseCardType (' 5555555555554444' ), ' mastercard' )
42
46
assert .equal (payform .parseCardType (' 5454545454545454' ), ' mastercard' )
47
+ assert .equal (payform .parseCardType (' 2221000002222221' ), ' mastercard' )
43
48
44
49
assert .equal (payform .parseCardType (' 378282246310005' ), ' amex' )
45
50
assert .equal (payform .parseCardType (' 371449635398431' ), ' amex' )
You can’t perform that action at this time.
0 commit comments