-
Notifications
You must be signed in to change notification settings - Fork 26
/
payments_test.go
87 lines (75 loc) · 1.57 KB
/
payments_test.go
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
package echotron
import "testing"
func TestRevenueWithdrawalStatePending(t *testing.T) {
r := RevenueWithdrawalStatePending{}
r.ImplementsRevenueWithdrawalState()
}
func TestRevenueWithdrawalStateSucceeded(t *testing.T) {
r := RevenueWithdrawalStateSucceeded{}
r.ImplementsRevenueWithdrawalState()
}
func TestRevenueWithdrawalStateFailed(t *testing.T) {
r := RevenueWithdrawalStateFailed{}
r.ImplementsRevenueWithdrawalState()
}
func TestTransactionPartnerFragment(t *testing.T) {
r := TransactionPartnerFragment{}
r.ImplementsTransactionPartner()
}
func TestTransactionPartnerUser(t *testing.T) {
r := TransactionPartnerUser{}
r.ImplementsTransactionPartner()
}
func TestTransactionPartnerTelegramAds(t *testing.T) {
r := TransactionPartnerTelegramAds{}
r.ImplementsTransactionPartner()
}
func TestTransactionPartnerOther(t *testing.T) {
r := TransactionPartnerOther{}
r.ImplementsTransactionPartner()
}
func TestSendInvoice(t *testing.T) {
_, err := api.SendInvoice(
chatID,
"TestSendInvoice",
"TestSendInvoiceDesc",
"echotron_test",
"XTR",
[]LabeledPrice{
{
Label: "Test",
Amount: 1,
},
},
nil,
)
if err != nil {
t.Fatal(err)
}
}
func TestCreateInvoiceLink(t *testing.T) {
_, err := api.CreateInvoiceLink(
"TestCreateInvoiceLink",
"TestCreateInvoiceLinkDesc",
"echotron_test",
"XTR",
[]LabeledPrice{
{
Label: "Test",
Amount: 1,
},
},
nil,
)
if err != nil {
t.Fatal(err)
}
}
func TestGetStarTransactions(t *testing.T) {
_, err := api.GetStarTransactions(
nil,
)
if err != nil {
t.Fatal(err)
}
}