Skip to content

Commit

Permalink
Add test case for JSON resource marshaling (#2544)
Browse files Browse the repository at this point in the history
  • Loading branch information
akshaypatil3096 committed Oct 28, 2022
1 parent 81b88b0 commit 288abdc
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions github/teams_test.go
Expand Up @@ -2224,3 +2224,23 @@ func TestExternalGroupTeam_Marshal(t *testing.T) {

testJSONMarshal(t, u, want)
}

func TestListExternalGroupsOptions_Marshal(t *testing.T) {
testJSONMarshal(t, &ListExternalGroupsOptions{}, "{}")

u := &ListExternalGroupsOptions{
DisplayName: String("test"),
ListOptions: ListOptions{
Page: 1,
PerPage: 2,
},
}

want := `{
"DisplayName": "test",
"page": 1,
"PerPage": 2
}`

testJSONMarshal(t, u, want)
}

0 comments on commit 288abdc

Please sign in to comment.