From 288abdc0cc3f3365cc59315e2db363c7e0450f00 Mon Sep 17 00:00:00 2001 From: Akshay <48827972+akshaypatil3096@users.noreply.github.com> Date: Sat, 29 Oct 2022 01:09:24 +0530 Subject: [PATCH] Add test case for JSON resource marshaling (#2544) --- github/teams_test.go | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/github/teams_test.go b/github/teams_test.go index a82fd60e0a..523e1bcd59 100644 --- a/github/teams_test.go +++ b/github/teams_test.go @@ -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) +}