Skip to content

Commit 19e1ba6

Browse files
Fix Go JSON serialize/deserialize test assertions for new vocab
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 034b244 commit 19e1ba6

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

go/types_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -71,14 +71,14 @@ func TestPermissionRequestResult_JSONRoundTrip(t *testing.T) {
7171
}
7272

7373
func TestPermissionRequestResult_JSONDeserialize(t *testing.T) {
74-
jsonStr := `{"kind":"denied-by-rules"}`
74+
jsonStr := `{"kind":"reject"}`
7575
var result PermissionRequestResult
7676
if err := json.Unmarshal([]byte(jsonStr), &result); err != nil {
7777
t.Fatalf("failed to unmarshal: %v", err)
7878
}
7979

80-
if result.Kind != PermissionRequestResultKindDeniedByRules {
81-
t.Errorf("expected %q, got %q", PermissionRequestResultKindDeniedByRules, result.Kind)
80+
if result.Kind != PermissionRequestResultKindRejected {
81+
t.Errorf("expected %q, got %q", PermissionRequestResultKindRejected, result.Kind)
8282
}
8383
}
8484

@@ -89,7 +89,7 @@ func TestPermissionRequestResult_JSONSerialize(t *testing.T) {
8989
t.Fatalf("failed to marshal: %v", err)
9090
}
9191

92-
expected := `{"kind":"approved"}`
92+
expected := `{"kind":"approve-once"}`
9393
if string(data) != expected {
9494
t.Errorf("expected %s, got %s", expected, string(data))
9595
}

0 commit comments

Comments
 (0)