Skip to content

Commit

Permalink
Merge branch 'bulk-credits-sweep-account' of github.com:balanced/bala…
Browse files Browse the repository at this point in the history
…nced-api into bulk-credits-sweep-account
  • Loading branch information
rserna2010 committed Dec 6, 2014
2 parents d1e4036 + 8ef8470 commit 36352e7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
7 changes: 4 additions & 3 deletions features/reversals.feature
Original file line number Diff line number Diff line change
Expand Up @@ -179,12 +179,13 @@ Feature: Reversal

Scenario: Reverse an Account credit after settlement
Given I have an Account with sufficient funds
When I make a POST request to the link "accounts.settlements" with the body:
When I POST to /accounts/:customer_payable_account_id/settlements with the body:

"""
{
"settlements": [{
"description": "Batch A",
"destination": /bank_accounts/:bank_account_id
"funding_instrument": /bank_accounts/:bank_account_id

This comment has been minimized.

Copy link
@mjallday

mjallday Dec 6, 2014

Contributor

@remear. this may have been the test that was causing that to break as well.

}]
}
"""
Expand All @@ -209,7 +210,7 @@ Feature: Reversal
}
"""

When I make a POST request to the link "accounts.settlements"
When POST to /accounts/:customer_payable_account_id/settlements
Then I should get a 201 Created status code
And the response is valid according to the "settlements" schema

Expand Down
3 changes: 2 additions & 1 deletion features/step_definitions/account.rb
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
Given(/^I have an Account with sufficient funds$/) do
step 'I have a merchant with 3 orders with debits'
3.times do |i|
order_href = "/orders/" + instance_variable_get("@order_id_#{i + 1}")
@client.post("/accounts/#{@customer_payable_account_id}/credits", {
amount: 10000,
order: "/orders/" + instance_variable_get("@order_id_#{i}")
order: order_href
})
@client.add_hydrate "credit_id_#{i}".to_sym, @client['id']
end
Expand Down

0 comments on commit 36352e7

Please sign in to comment.