-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathapi_metadata_test.go
72 lines (57 loc) · 1.33 KB
/
api_metadata_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
package blockfrost_test
import (
"context"
"reflect"
"testing"
"github.com/blockfrost/blockfrost-go"
)
func TestResourceMetadataTxLabels(t *testing.T) {
t.Parallel()
api := blockfrost.NewAPIClient(
blockfrost.APIClientOptions{},
)
q := blockfrost.APIQueryParams{
Count: 1,
}
got, err := api.MetadataTxLabels(context.TODO(), q)
if err != nil {
t.Fatalf(err.Error())
}
if reflect.DeepEqual(got, []blockfrost.MetadataTxLabel{}) {
t.Fatalf("got null %+v", got)
}
}
func TestResourceMetadataTxContentInJSON(t *testing.T) {
t.Parallel()
inputLabel := "1990"
api := blockfrost.NewAPIClient(
blockfrost.APIClientOptions{},
)
q := blockfrost.APIQueryParams{
Count: 1,
}
got, err := api.MetadataTxContentInJSON(context.TODO(), inputLabel, q)
if err != nil {
t.Fatalf(err.Error())
}
if reflect.DeepEqual(got, []blockfrost.MetadataTxContentInJSON{}) {
t.Fatalf("got null %+v", got)
}
}
func TestResourceMetadataTxContentInCBOR(t *testing.T) {
t.Parallel()
inputLabel := "1990"
api := blockfrost.NewAPIClient(
blockfrost.APIClientOptions{},
)
q := blockfrost.APIQueryParams{
Count: 1,
}
got, err := api.MetadataTxContentInCBOR(context.TODO(), inputLabel, q)
if err != nil {
t.Fatalf(err.Error())
}
if reflect.DeepEqual(got, []blockfrost.MetadataTxContentInCBOR{}) {
t.Fatalf("got null %+v", got)
}
}