-
Notifications
You must be signed in to change notification settings - Fork 2
/
pvp_test.go
63 lines (53 loc) · 1.23 KB
/
pvp_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
package gw2api
import (
"os"
"testing"
)
func TestPvPStats(t *testing.T) {
key := os.Getenv("APIKEY")
if key == "" {
t.Skip("Unable to test without APIKEY")
}
api := New().WithAccessToken(key)
if _, err := api.PvPStats(); err != nil {
t.Errorf("PvPStats failed: '%s'", err)
}
}
func TestPvPGames(t *testing.T) {
key := os.Getenv("APIKEY")
if key == "" {
t.Skip("Unable to test without APIKEY")
}
api := New()
if _, err := api.PvPGames(); err != nil {
t.Errorf("PvPGames failed: '%s'", err)
}
}
func TestPvPStandings(t *testing.T) {
key := os.Getenv("APIKEY")
if key == "" {
t.Skip("Unable to test without APIKEY")
}
api := New()
if _, err := api.PvPStandings(); err != nil {
t.Errorf("PvPStandings failed: '%s'", err)
}
}
func TestPvPRanks(t *testing.T) {
api := New()
if _, err := api.PvPRanks(); err != nil {
t.Errorf("PvPRanks failed: '%s'", err)
}
}
func TestPvPSeasons(t *testing.T) {
api := New()
if _, err := api.PvPSeasons(); err != nil {
t.Errorf("PvPSeasons failed: '%s'", err)
}
}
func TestPvPSeasonLeaderboards(t *testing.T) {
api := New()
if _, err := api.PvPSeasonLeaderboards("020A557D-387A-4A6F-904B-D0A0DBEE68FB", "eu"); err != nil {
t.Errorf("PvPSeasonLeaderboards failed: '%s'", err)
}
}