Skip to content

Commit 288abdc

Browse files
Add test case for JSON resource marshaling (#2544)
1 parent 81b88b0 commit 288abdc

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

github/teams_test.go

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2224,3 +2224,23 @@ func TestExternalGroupTeam_Marshal(t *testing.T) {
22242224

22252225
testJSONMarshal(t, u, want)
22262226
}
2227+
2228+
func TestListExternalGroupsOptions_Marshal(t *testing.T) {
2229+
testJSONMarshal(t, &ListExternalGroupsOptions{}, "{}")
2230+
2231+
u := &ListExternalGroupsOptions{
2232+
DisplayName: String("test"),
2233+
ListOptions: ListOptions{
2234+
Page: 1,
2235+
PerPage: 2,
2236+
},
2237+
}
2238+
2239+
want := `{
2240+
"DisplayName": "test",
2241+
"page": 1,
2242+
"PerPage": 2
2243+
}`
2244+
2245+
testJSONMarshal(t, u, want)
2246+
}

0 commit comments

Comments
 (0)