Fix test helper. Update test case.

This commit is contained in:
Jay
2026-03-03 09:29:13 -05:00
parent eeb0ac9364
commit a1be3faf14

View File

@@ -42,7 +42,7 @@ func expectEqualGraphFilters(t *testing.T, got, want GraphFilter) {
for i := range want.Graph { for i := range want.Graph {
expectEqualGraphFilters(t, got.Graph[i], want.Graph[i]) expectEqualGraphFilters(t, got.Graph[i], want.Graph[i])
} }
// assert.Equal(t, want.Extensions, got.Extensions) assert.Equal(t, want.Extensions, got.Extensions)
} }
// Tests // Tests
@@ -80,10 +80,10 @@ func TestMarshalJSON(t *testing.T) {
name: "graph field only", name: "graph field only",
filter: HeartwoodFilter{ filter: HeartwoodFilter{
Graph: []GraphFilter{ Graph: []GraphFilter{
{Kinds: []json.RawMessage{json.RawMessage(`"$event.kind"`)}}, {Kinds: []json.RawMessage{json.RawMessage(`1`)}},
}, },
}, },
expected: `{"graph":[{"kinds":["$event.kind"]}]}`, expected: `{"graph":[{"kinds":[1]}]}`,
}, },
{ {
name: "legacy and graph present", name: "legacy and graph present",