-
Notifications
You must be signed in to change notification settings - Fork 0
/
stats_test.go
57 lines (55 loc) · 950 Bytes
/
stats_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
package yfquery
import "testing"
func TestStatsQuery(t *testing.T) {
testQueries(t,
[]testQueryPair{
{
Stats(),
"/stats",
},
{
Stats().Week(1),
"/stats;type=week;week=1",
},
{
Stats().LastWeek(),
"/stats;type=lastweek",
},
{
Stats().LastMonth(),
"/stats;type=lastmonth",
},
{
Stats().LastWeekAverage(),
"/stats;type=average_lastweek",
},
{
Stats().LastMonthAverage(),
"/stats;type=average_lastmonth",
},
{
Stats().Today(),
"/stats;type=date",
},
{
Stats().Day("2006-10-06"),
"/stats;type=date;date=2006-10-06",
},
{
Stats().CurrentSeason(),
"/stats;type=season",
},
{
Stats().Season(2022),
"/stats;type=season;season=2022",
},
{
Stats().CurrentSeasonAverage(),
"/stats;type=average_season",
},
{
Stats().SeasonAverage(2022),
"/stats;type=average_season;season=2022",
},
})
}