Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Add test case for JSON resource marshaling
  • Loading branch information
akshaypatil3096 committed Oct 28, 2022
commit e42cd4145ead9043e270047e6fc71b3ed7e9cd45
20 changes: 20 additions & 0 deletions github/teams_test.go
Original file line number Diff line number Diff line change
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)
}