diff options
Diffstat (limited to 'client_test.go')
| -rw-r--r-- | client_test.go | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/client_test.go b/client_test.go index 09db153..e1fdc4d 100644 --- a/client_test.go +++ b/client_test.go @@ -77,6 +77,45 @@ func TestClient_RtolInquiry_live(t *testing.T) { test.Assert(t, `AccountName`, `Test Account`, inquiryRes.AccountName) } +func TestClient_RtolTransfer_sandbox(t *testing.T) { + t.Skip(`This test require external call to server`) + + var ( + err error + tdata *test.Data + inquiryReq *RtolInquiry + inquiryRes *RtolInquiryResponse + transferRes *RtolTransferResponse + ) + + tdata, err = test.LoadData(`testdata/disbursement_rtol_transfer_test.txt`) + if err != nil { + t.Fatal(err) + } + + err = json.Unmarshal(tdata.Input[`request_inquiry.json`], &inquiryReq) + if err != nil { + t.Fatal(err) + } + + inquiryRes, err = testClient.RtolInquiry(*inquiryReq) + if err != nil { + t.Fatal(err) + } + + transferRes, err = testClient.RtolTransfer(*inquiryReq, *inquiryRes) + if err != nil { + t.Fatal(err) + } + + // We cannot compare the response, because for each call to server + // it will return different CustRefNumber and DisburseID. + + t.Logf(`RtolTransfer response: %+v`, transferRes) + + test.Assert(t, `AccountName`, `Test Account`, inquiryRes.AccountName) +} + func TestClient_DisbursementListBank(t *testing.T) { var ( tdata *test.Data |
