-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathachievements_test.go
66 lines (55 loc) · 1.5 KB
/
achievements_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
package gw2api
import (
"os"
"testing"
)
func TestAchievements(t *testing.T) {
key := os.Getenv("APIKEY")
if key == "" {
t.Skip("Unable to test without APIKey")
}
api := New().WithAccessToken(key)
if _, err := api.Achievements(); err != nil {
t.Errorf("Achievements failed fetching endpoint: '%s'", err)
}
}
func TestDailyAchievements(t *testing.T) {
key := os.Getenv("APIKEY")
if key == "" {
t.Skip("Unable to test without APIKey")
}
api := New().WithAccessToken(key)
if _, err := api.DailyAchievements(); err != nil {
t.Errorf("DailyAchievements failed fetching endpoint: '%s'", err)
}
}
func TestTomorrowDailyAchievements(t *testing.T) {
key := os.Getenv("APIKEY")
if key == "" {
t.Skip("Unable to test without APIKey")
}
api := New().WithAccessToken(key)
if _, err := api.TomorrowDailyAchievements(); err != nil {
t.Errorf("TomorrowDailyAchievements failed fetching endpoint: '%s'", err)
}
}
func TestAchievementGroups(t *testing.T) {
key := os.Getenv("APIKEY")
if key == "" {
t.Skip("Unable to test without APIKey")
}
api := New().WithAccessToken(key)
if _, err := api.AchievementGroups(); err != nil {
t.Errorf("AchievementGroups failed fetching endpoint: '%s'", err)
}
}
func TestAchievementCategories(t *testing.T) {
key := os.Getenv("APIKEY")
if key == "" {
t.Skip("Unable to test without APIKey")
}
api := New().WithAccessToken(key)
if _, err := api.AchievementCategories(); err != nil {
t.Errorf("AchievementCategories failed fetching endpoint: '%s'", err)
}
}