From 4e394ef01b1d0b287b147b26b7b4b98f79b434fa Mon Sep 17 00:00:00 2001 From: Sagar Sonwane <44731466+sagar23sj@users.noreply.github.com> Date: Tue, 1 Nov 2022 00:59:17 +0530 Subject: [PATCH] Add test case for JSON resource marshaling (#2551) --- github/teams_test.go | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/github/teams_test.go b/github/teams_test.go index 523e1bcd59..d267846ecb 100644 --- a/github/teams_test.go +++ b/github/teams_test.go @@ -2244,3 +2244,17 @@ func TestListExternalGroupsOptions_Marshal(t *testing.T) { testJSONMarshal(t, u, want) } + +func TestTeamAddTeamRepoOptions_Marshal(t *testing.T) { + testJSONMarshal(t, &TeamAddTeamRepoOptions{}, "{}") + + u := &TeamAddTeamRepoOptions{ + Permission: "a", + } + + want := `{ + "permission": "a" + }` + + testJSONMarshal(t, u, want) +}