From fdba708458d988191c71ab1705e3751c35e97853 Mon Sep 17 00:00:00 2001 From: sagar23sj Date: Mon, 31 Oct 2022 12:30:34 +0530 Subject: [PATCH] Add test case for JSON resource marshaling - RequiredStatusCheck --- 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) +}