From 434b1d888a22febd131a97de0ecf07e733093bc3 Mon Sep 17 00:00:00 2001 From: Sagar Sonwane <44731466+sagar23sj@users.noreply.github.com> Date: Tue, 1 Nov 2022 00:56:24 +0530 Subject: [PATCH] Add test case for JSON resource marshaling (#2549) --- github/repos_test.go | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/github/repos_test.go b/github/repos_test.go index 0d0633eee7b..bcaa7d3d615 100644 --- a/github/repos_test.go +++ b/github/repos_test.go @@ -3127,3 +3127,19 @@ func TestPullRequestReviewsEnforcementUpdate_Marshal(t *testing.T) { testJSONMarshal(t, u, want) } + +func TestRequiredStatusCheck_Marshal(t *testing.T) { + testJSONMarshal(t, &RequiredStatusCheck{}, "{}") + + u := &RequiredStatusCheck{ + Context: "ctx", + AppID: Int64(1), + } + + want := `{ + "context": "ctx", + "app_id": 1 + }` + + testJSONMarshal(t, u, want) +}