@@ -499,21 +499,9 @@ func TestConverter_WithEmptyCondition(t *testing.T) {
499499}
500500
501501func TestConverter_NoConstructor (t * testing.T ) {
502- t .Skip () // this is currently not supported since we introduced the access control options
503-
504502 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- }
515503
516- conditions , values , err = c .Convert ([]byte (`` ), 1 )
504+ conditions , values , err : = c .Convert ([]byte (`` ), 1 )
517505 if err != nil {
518506 t .Fatal (err )
519507 }
@@ -523,6 +511,11 @@ func TestConverter_NoConstructor(t *testing.T) {
523511 if len (values ) != 0 {
524512 t .Errorf ("Converter.Convert() values = %v, want nil" , values )
525513 }
514+
515+ _ , _ , err = c .Convert ([]byte (`{"name": "John"}` ), 1 )
516+ if err == nil {
517+ t .Fatal ("expected error, got nil" )
518+ }
526519}
527520
528521func TestConverter_CopyReference (t * testing.T ) {
0 commit comments