Skip to content

Commit

Permalink
test: Add tests for resource JSON marshalling - TrafficBreakdownOptions
Browse files Browse the repository at this point in the history
Added test for

Helps: google#55
  • Loading branch information
tsbkw committed Oct 28, 2022
1 parent f550bc8 commit 9c983a8
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions github/repos_traffic_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -308,3 +308,17 @@ func TestTrafficData_Marshal(t *testing.T) {

testJSONMarshal(t, u, want)
}

func TestTrafficBreakdownOptions_Marshal(t *testing.T) {
testJSONMarshal(t, &TrafficBreakdownOptions{}, "{}")

u := &TrafficBreakdownOptions{
Per: "day",
}

want := `{
"per": "day"
}`

testJSONMarshal(t, u, want)
}

0 comments on commit 9c983a8

Please sign in to comment.