Skip to content
This repository has been archived by the owner on Sep 24, 2022. It is now read-only.

Commit

Permalink
Update test
Browse files Browse the repository at this point in the history
  • Loading branch information
lildude committed Feb 26, 2019
1 parent 7740f6e commit e644e58
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ func TestTxnHandler(t *testing.T) {
{
name: "non-card inbound above threshold",
method: http.MethodPost,
body: `{"webhookType":"TRANSACTION_FASTER_PAYMENTS_IN","content":{"amount": 2500.00}}`,
body: `{"webhookType":"TRANSACTION_FASTER_PAYMENT_IN","content":{"amount": 2500.00}}`,
goal: "sweep",
message: "INFO: transfer successful (Txn: | 254.12)",
mockresp: []byte(`{"effectiveBalance": 2754.12}`),
Expand All @@ -207,7 +207,7 @@ func TestTxnHandler(t *testing.T) {
{
name: "no sweep goal set",
method: http.MethodPost,
body: `{"webhookType":"TRANSACTION_FASTER_PAYMENTS_IN","content":{"amount": 2500.00}}`,
body: `{"webhookType":"TRANSACTION_FASTER_PAYMENT_IN","content":{"amount": 2500.00}}`,
goal: "",
message: "INFO: no sweep savings goal set. Nothing to do.",
mockresp: []byte(`{"effectiveBalance": 2754.12}`),
Expand All @@ -216,7 +216,7 @@ func TestTxnHandler(t *testing.T) {
{
name: "non-card inbound below threshold",
method: http.MethodPost,
body: `{"webhookType":"TRANSACTION_FASTER_PAYMENTS_IN","content":{"amount": 500.00}}`,
body: `{"webhookType":"TRANSACTION_FASTER_PAYMENT_IN","content":{"amount": 500.00}}`,
goal: "sweep",
message: "INFO: ignoring inbound transaction below sweep threshold",
mockresp: []byte(`{"amount": 500.00, "balance": 754.12}`),
Expand Down Expand Up @@ -252,7 +252,7 @@ func TestTxnHandler(t *testing.T) {
{
name: "forced failure to get balance",
method: http.MethodPost,
body: `{"webhookType":"TRANSACTION_FASTER_PAYMENTS_IN","content":{"amount": 2500.00}}`,
body: `{"webhookType":"TRANSACTION_FASTER_PAYMENT_IN","content":{"amount": 2500.00}}`,
goal: "sweep",
message: "ERROR: problem getting balance",
mockresp: []byte(`{"broken": "json`),
Expand Down

0 comments on commit e644e58

Please sign in to comment.