Skip to content

Commit

Permalink
Add test case for JSON resource marshaling (#3075)
Browse files Browse the repository at this point in the history
  • Loading branch information
ShervilG authored Feb 14, 2024
1 parent a516e21 commit 8bb3d09
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions github/secret_scanning_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -595,3 +595,19 @@ func TestSecretScanningAlertLocationDetails_Marshal(t *testing.T) {

testJSONMarshal(t, u, want)
}

func TestSecretScanningAlertUpdateOptions_Marshal(t *testing.T) {
testJSONMarshal(t, &SecretScanningAlertUpdateOptions{}, `{}`)

u := &SecretScanningAlertUpdateOptions{
State: "open",
Resolution: String("false_positive"),
}

want := `{
"state": "open",
"resolution": "false_positive"
}`

testJSONMarshal(t, u, want)
}

0 comments on commit 8bb3d09

Please sign in to comment.