Skip to content

Commit

Permalink
payments.go: add tests
Browse files Browse the repository at this point in the history
  • Loading branch information
DjMike238 committed Sep 22, 2024
1 parent 83325b0 commit 0df2ea4
Showing 1 changed file with 54 additions and 0 deletions.
54 changes: 54 additions & 0 deletions payments_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
package echotron

import "testing"

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)
}
}

0 comments on commit 0df2ea4

Please sign in to comment.