Skip to content

Commit

Permalink
Add test for resource JSON marshaling (#2538)
Browse files Browse the repository at this point in the history
  • Loading branch information
tsbkw committed Oct 28, 2022
1 parent f550bc8 commit fd784db
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions github/repos_traffic_test.go
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 fd784db

Please sign in to comment.