Skip to content

Commit 8bb3d09

Browse files
authored
Add test case for JSON resource marshaling (#3075)
1 parent a516e21 commit 8bb3d09

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

github/secret_scanning_test.go

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -595,3 +595,19 @@ func TestSecretScanningAlertLocationDetails_Marshal(t *testing.T) {
595595

596596
testJSONMarshal(t, u, want)
597597
}
598+
599+
func TestSecretScanningAlertUpdateOptions_Marshal(t *testing.T) {
600+
testJSONMarshal(t, &SecretScanningAlertUpdateOptions{}, `{}`)
601+
602+
u := &SecretScanningAlertUpdateOptions{
603+
State: "open",
604+
Resolution: String("false_positive"),
605+
}
606+
607+
want := `{
608+
"state": "open",
609+
"resolution": "false_positive"
610+
}`
611+
612+
testJSONMarshal(t, u, want)
613+
}

0 commit comments

Comments
 (0)