Skip to content

Commit

Permalink
Add test case for JSON resource marshaling (#2549)
Browse files Browse the repository at this point in the history
  • Loading branch information
sagar23sj authored Oct 31, 2022
1 parent 5d388bd commit 434b1d8
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions github/repos_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}

0 comments on commit 434b1d8

Please sign in to comment.