@@ -499,21 +499,9 @@ func TestConverter_WithEmptyCondition(t *testing.T) {
499
499
}
500
500
501
501
func TestConverter_NoConstructor (t * testing.T ) {
502
- t .Skip () // this is currently not supported since we introduced the access control options
503
-
504
502
c := & filter.Converter {}
505
- conditions , values , err := c .Convert ([]byte (`{"name": "John"}` ), 1 )
506
- if err != nil {
507
- t .Fatal (err )
508
- }
509
- if want := `("name" = $1)` ; conditions != want {
510
- t .Errorf ("Converter.Convert() conditions = %v, want %v" , conditions , want )
511
- }
512
- if ! reflect .DeepEqual (values , []any {"John" }) {
513
- t .Errorf ("Converter.Convert() values = %v, want %v" , values , []any {"John" })
514
- }
515
503
516
- conditions , values , err = c .Convert ([]byte (`` ), 1 )
504
+ conditions , values , err : = c .Convert ([]byte (`` ), 1 )
517
505
if err != nil {
518
506
t .Fatal (err )
519
507
}
@@ -523,6 +511,11 @@ func TestConverter_NoConstructor(t *testing.T) {
523
511
if len (values ) != 0 {
524
512
t .Errorf ("Converter.Convert() values = %v, want nil" , values )
525
513
}
514
+
515
+ _ , _ , err = c .Convert ([]byte (`{"name": "John"}` ), 1 )
516
+ if err == nil {
517
+ t .Fatal ("expected error, got nil" )
518
+ }
526
519
}
527
520
528
521
func TestConverter_CopyReference (t * testing.T ) {
0 commit comments