-
Notifications
You must be signed in to change notification settings - Fork 8
/
fetch_test.go
101 lines (93 loc) · 2.01 KB
/
fetch_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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
package bfldb
import (
"context"
"testing"
"github.com/stretchr/testify/require"
)
func TestSearchNickname(t *testing.T) {
tests := []struct {
nickname string
assertion require.ErrorAssertionFunc
}{
{
nickname: "StellarMom",
assertion: require.NoError,
},
}
for _, tt := range tests {
t.Run(tt.nickname, func(t *testing.T) {
_, err := SearchNickname(context.Background(), tt.nickname)
tt.assertion(t, err)
})
}
}
func TestGetOtherLeaderboardBaseInfo(t *testing.T) {
tests := []struct {
uuid string
assertion require.ErrorAssertionFunc
}{
{
uuid: "3AFFCB67ED4F1D1D8437BA17F4E8E5ED",
assertion: require.NoError,
},
}
for _, tt := range tests {
t.Run(tt.uuid, func(t *testing.T) {
_, err := GetOtherLeaderboardBaseInfo(context.Background(), tt.uuid)
tt.assertion(t, err)
})
}
}
func TestUser_GetOtherLeaderboardBaseInfo(t *testing.T) {
tests := []struct {
uuid string
assertion require.ErrorAssertionFunc
}{
{
uuid: "3AFFCB67ED4F1D1D8437BA17F4E8E5ED",
assertion: require.NoError,
},
}
for _, tt := range tests {
t.Run(tt.uuid, func(t *testing.T) {
u := NewUser(tt.uuid)
_, err := u.GetOtherLeaderboardBaseInfo(context.Background())
tt.assertion(t, err)
})
}
}
func TestGetOtherPosition(t *testing.T) {
tests := []struct {
uuid string
assertion require.ErrorAssertionFunc
}{
{
uuid: "3AFFCB67ED4F1D1D8437BA17F4E8E5ED",
assertion: require.NoError,
},
}
for _, tt := range tests {
t.Run(tt.uuid, func(t *testing.T) {
_, err := GetOtherPosition(context.Background(), tt.uuid)
tt.assertion(t, err)
})
}
}
func TestUser_GetOtherPosition(t *testing.T) {
tests := []struct {
uuid string
assertion require.ErrorAssertionFunc
}{
{
uuid: "3AFFCB67ED4F1D1D8437BA17F4E8E5ED",
assertion: require.NoError,
},
}
for _, tt := range tests {
t.Run(tt.uuid, func(t *testing.T) {
u := NewUser(tt.uuid)
_, err := u.GetOtherPosition(context.Background())
tt.assertion(t, err)
})
}
}