Skip to content

Commit

Permalink
reverse a pending credit to a debit card balanced#620
Browse files Browse the repository at this point in the history
  • Loading branch information
matin committed May 19, 2014
1 parent 0f6ba91 commit 34e85dd
Showing 1 changed file with 32 additions and 1 deletion.
33 changes: 32 additions & 1 deletion features/push_to_card.feature
Original file line number Diff line number Diff line change
Expand Up @@ -197,9 +197,40 @@ Feature: Push to card
When I make a POST request to the link "credits.reversals"
Then I should get a 201 Created status code
And the response is valid according to the "reversals" schema
And the fields on this credit match:
And the fields on this reversal match:
"""
{
"status": "succeeded"
}
"""

Scenario: Reverse a pending credit to a debit card
The debit card number "4210101111111112" is a special card number

Given I have sufficient funds in my marketplace
When I POST to /cards with the JSON API body:
"""
{
"cards": [{
"name": "George Handel",
"number": "4210101111111112",
"expiration_month": "05",
"expiration_year": "2017"
}]
}
"""
And the fields on this credit match:
"""
{
"status": "pending"
}
"""
And I POST to "credits.reversals"
Then I should get a 201 Created status code
And the response is valid according to the "reversals" schema
And the fields on this reversal match:
"""
{
"status": "succeeded"
}
"""

0 comments on commit 34e85dd

Please sign in to comment.