42 lines
655 B
Go
42 lines
655 B
Go
//go:build integration
|
|
|
|
package teller_test
|
|
|
|
import (
|
|
"context"
|
|
"testing"
|
|
|
|
"gogs.inhome.blapointe.com/ana-ledger/src/bank/teller"
|
|
)
|
|
|
|
func Test(t *testing.T) {
|
|
teller.Tokens = "test_token_bfu2cyvq3il6o"
|
|
|
|
c, err := teller.New()
|
|
if err != nil {
|
|
t.Fatal(err)
|
|
}
|
|
|
|
ctx := context.Background()
|
|
|
|
accounts, err := c.Accounts(ctx)
|
|
if err != nil {
|
|
t.Fatal(err)
|
|
}
|
|
|
|
for _, account := range accounts {
|
|
account := account
|
|
t.Run(account.Account, func(t *testing.T) {
|
|
transactions, err := c.Transactions(ctx, account)
|
|
if err != nil {
|
|
t.Fatal(err)
|
|
}
|
|
|
|
for i, tr := range transactions {
|
|
t.Logf("[%d] %+v", i, tr)
|
|
}
|
|
})
|
|
break
|
|
}
|
|
}
|