-
Notifications
You must be signed in to change notification settings - Fork 23
Expand file tree
/
Copy pathfraud_management_test.go
More file actions
51 lines (42 loc) · 879 Bytes
/
Copy pathfraud_management_test.go
File metadata and controls
51 lines (42 loc) · 879 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
package AuthorizeCIM
import (
"testing"
)
func TestGetUnsettledTransactions(t *testing.T) {
transactions, err := UnsettledBatchList()
if err != nil {
t.Fail()
}
t.Log("Count Unsettled: ", transactions.Count)
t.Log(transactions.List())
}
func TestApproveTransaction(t *testing.T) {
oldTransaction := PreviousTransaction{
Amount: "49.99",
RefId: "39824723983",
}
response, err := oldTransaction.Approve()
if err != nil {
t.Fail()
}
if response.Approved() {
t.Log(response.ErrorMessage())
} else {
t.Log(response.ErrorMessage())
}
}
func TestDeclineTransaction2(t *testing.T) {
oldTransaction := PreviousTransaction{
Amount: "49.99",
RefId: "39824723983",
}
response, err := oldTransaction.Decline()
if err != nil {
t.Fail()
}
if response.Approved() {
t.Log(response.ErrorMessage())
} else {
t.Log(response.ErrorMessage())
}
}