Skip to content

Commit 282a391

Browse files
Add test case for JSON resource marshaling (#2546)
1 parent 43edea6 commit 282a391

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

github/teams_members_test.go

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

804804
testJSONMarshal(t, u, want)
805805
}
806+
807+
func TestTeamListTeamMembersOptions_Marshal(t *testing.T) {
808+
testJSONMarshal(t, &TeamListTeamMembersOptions{}, "{}")
809+
810+
u := &TeamListTeamMembersOptions{
811+
Role: "role",
812+
ListOptions: ListOptions{
813+
Page: 1,
814+
PerPage: 2,
815+
},
816+
}
817+
818+
want := `{
819+
"role": "role",
820+
"Page": 1,
821+
"PerPage": 2
822+
}`
823+
824+
testJSONMarshal(t, u, want)
825+
}

0 commit comments

Comments
 (0)