Skip to content

Commit 6a9e94e

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

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
@@ -240,6 +240,14 @@ func TestConverter_Convert(t *testing.T) {
240240
nil,
241241
fmt.Errorf("$not as scalar operator not supported"),
242242
},
243+
{
244+
"$not with a scalar",
245+
nil,
246+
`{"$not": "John"}`,
247+
``,
248+
nil,
249+
fmt.Errorf("invalid value for $not operator (must be object): John"),
250+
},
243251
}
244252

245253
for _, tt := range tests {

0 commit comments

Comments
 (0)