From 111ee3f9c83624ab9bb08ad128fb68e1f24bd30b Mon Sep 17 00:00:00 2001 From: ShervilG Date: Wed, 14 Feb 2024 13:21:41 +0530 Subject: [PATCH] Added json marshaling test - SecretScanningAlertUpdateOptions --- github/secret_scanning_test.go | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/github/secret_scanning_test.go b/github/secret_scanning_test.go index 7898d29a38c..1c8ad82bfcb 100644 --- a/github/secret_scanning_test.go +++ b/github/secret_scanning_test.go @@ -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) +}