Fix test helper. Update test case.
This commit is contained in:
@@ -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",
|
||||||
|
|||||||
Reference in New Issue
Block a user