Skip to content

Commit fe47a78

Browse files
Test error with $not with a scalar
Co-authored-by: Koen Bollen <[email protected]>
1 parent c9591a8 commit fe47a78

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

filter/converter_test.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,14 @@ func TestConverter_Convert(t *testing.T) {
232232
nil,
233233
fmt.Errorf("$not as scalar operator not supported"),
234234
},
235+
{
236+
"$not with a scalar",
237+
nil,
238+
`{"$not": "John"}`,
239+
``,
240+
nil,
241+
fmt.Errorf("invalid value for $not operator (must be object): John"),
242+
},
235243
}
236244

237245
for _, tt := range tests {

0 commit comments

Comments
 (0)