Skip to content

Commit

Permalink
Add test case for JSON resource marshaling (#2546)
Browse files Browse the repository at this point in the history
  • Loading branch information
akshaypatil3096 committed Oct 30, 2022
1 parent 43edea6 commit 282a391
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions github/teams_members_test.go
Expand Up @@ -803,3 +803,23 @@ func TestTeamAddTeamMembershipOptions_Marshal(t *testing.T) {

testJSONMarshal(t, u, want)
}

func TestTeamListTeamMembersOptions_Marshal(t *testing.T) {
testJSONMarshal(t, &TeamListTeamMembersOptions{}, "{}")

u := &TeamListTeamMembersOptions{
Role: "role",
ListOptions: ListOptions{
Page: 1,
PerPage: 2,
},
}

want := `{
"role": "role",
"Page": 1,
"PerPage": 2
}`

testJSONMarshal(t, u, want)
}

0 comments on commit 282a391

Please sign in to comment.