aboutsummaryrefslogtreecommitdiff
path: root/client_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'client_test.go')
-rw-r--r--client_test.go33
1 files changed, 33 insertions, 0 deletions
diff --git a/client_test.go b/client_test.go
index 95f61a6..09db153 100644
--- a/client_test.go
+++ b/client_test.go
@@ -44,6 +44,39 @@ func TestClient_DisbursementCheckBalance(t *testing.T) {
test.Assert(t, `DisbursementCheckBalance`, string(exp), string(got))
}
+func TestClient_RtolInquiry_live(t *testing.T) {
+ t.Skip(`This test require external call to server`)
+
+ var (
+ inquiryReq RtolInquiry
+ err error
+ tdata *test.Data
+ inquiryRes *RtolInquiryResponse
+ )
+
+ tdata, err = test.LoadData(`testdata/disbursement_rtol_inquiry_test.txt`)
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ err = json.Unmarshal(tdata.Input[`request.json`], &inquiryReq)
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ inquiryRes, err = testClient.RtolInquiry(inquiryReq)
+ 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(`inquiryRes: %+v`, inquiryRes)
+
+ test.Assert(t, `AccountName`, `Test Account`, inquiryRes.AccountName)
+}
+
func TestClient_DisbursementListBank(t *testing.T) {
var (
tdata *test.Data