Skip to content

Commit fd784db

Browse files
authored
Add test for resource JSON marshaling (#2538)
1 parent f550bc8 commit fd784db

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

github/repos_traffic_test.go

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -308,3 +308,17 @@ func TestTrafficData_Marshal(t *testing.T) {
308308

309309
testJSONMarshal(t, u, want)
310310
}
311+
312+
func TestTrafficBreakdownOptions_Marshal(t *testing.T) {
313+
testJSONMarshal(t, &TrafficBreakdownOptions{}, "{}")
314+
315+
u := &TrafficBreakdownOptions{
316+
Per: "day",
317+
}
318+
319+
want := `{
320+
"per": "day"
321+
}`
322+
323+
testJSONMarshal(t, u, want)
324+
}

0 commit comments

Comments
 (0)