From 282a391a7fa3706035c4b2c17ccb8f4451e5452b Mon Sep 17 00:00:00 2001 From: Akshay <48827972+akshaypatil3096@users.noreply.github.com> Date: Mon, 31 Oct 2022 01:27:47 +0530 Subject: [PATCH] Add test case for JSON resource marshaling (#2546) --- github/teams_members_test.go | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/github/teams_members_test.go b/github/teams_members_test.go index 61944567fa..5ef1735160 100644 --- a/github/teams_members_test.go +++ b/github/teams_members_test.go @@ -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) +}