Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
115 changes: 113 additions & 2 deletions features/cards.feature
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ Feature: Credit cards
}
"""


Scenario: Retrieve a card
Given I have tokenized a card
When I GET to /cards/:card_id giving the card_id
Expand Down Expand Up @@ -196,7 +195,7 @@ Feature: Credit cards
}
"""

Scenario: AVS street matches
Scenario: AVS street matches
When I make a POST request to /cards with the body:
"""
{
Expand Down Expand Up @@ -267,6 +266,118 @@ Feature: Credit cards
}
"""

@failing
Scenario: AVS postal code re-verification matches
When I PUT to /cards/:card_id giving the card_id, with the body:
"""
{
"cards": [{
"address": {
"postal_code": "94301"
}
}]
}
"""

Then I should get a 200 OK status code
And the response is valid according to the "cards" schema
And the fields on this card match:
"""
{
"avs_postal_match": "yes"
}
"""

@failing
Scenario: AVS postal code re-verification does not match
When I PUT to /cards/:card_id giving the card_id, with the body:
"""
{
"cards": [{
"address": {
"postal_code": "90210"
}
}]
}
"""

Then I should get a 200 OK status code
And the response is valid according to the "cards" schema
And the fields on this card match:
"""
{
"avs_postal_match": "no"
}
"""

@failing
Scenario: AVS postal code re-verification is unsupported
When I PUT to /cards/:card_id giving the card_id, with the body:
"""
{
"cards": [{
"address": {
"postal_code": "90211"
}
}]
}
"""

Then I should get a 200 OK status code
And the response is valid according to the "cards" schema
And the fields on this card match:
"""
{
"avs_postal_match": "unsupported"
}
"""

@failing
Scenario: AVS street re-verification matches
When I PUT to /cards/:card_id giving the card_id, with the body:
"""
{
"cards": [{
"address": {
"line1": "965 Mission St",
"postal_code": "94103"
}
}]
}
"""

Then I should get a 200 OK status code
And the response is valid according to the "cards" schema
And the fields on this card match:
"""
{
"avs_street_match": "yes"
}
"""

@failing
Scenario: AVS street re-verification does not match
When I PUT to /cards/:card_id giving the card_id, with the body:
"""
{
"cards": [{
"address": {
"line1": "21 Jump St",
"postal_code": "90210"
}
}]
}
"""

Then I should get a 200 OK status code
And the response is valid according to the "cards" schema
And the fields on this card match:
"""
{
"avs_street_match": "no"
}
"""

Scenario: Detect a Visa card brand
When I make a POST request to /cards with the body:
"""
Expand Down