You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Scenario: Create a failed refund when insufficient funds are in order escrow
Given I have created an order
And I have tokenized a card
When I make a POST request to the link "cards.debits" with the body:
"""
{
"order": "<%= @orders_id %>",
"amount": 1234
}
"""
And I have tokenized a bank account
Then I make a POST request to the link "bank_accounts.credits" with the body:
"""
{
"order": "<%= @orders_id %>",
"amount": 1234
}
"""
When I make a POST request to the link "debits.refunds" of that debit
Then I should get a 409 status code
And the response is valid according to the "errors" schema
And the fields on this error match:
"""
{
"category_code": "account-insufficient-funds"
}
"""
Right now, the 409 is returning a 201 instead. Seems bad. :/
Since this was previously failing (#435) I'm not sure what's right.
Currently porting https://github.com/balanced/balanced-api/blob/revision1/scenarios/orders/create_refund.yml over to cucumber:
Right now, the 409 is returning a 201 instead. Seems bad. :/
/cc @matthewfl
The text was updated successfully, but these errors were encountered: