Bug 30074: Regression tests
authorTomas Cohen Arazi <tomascohen@theke.io>
Wed, 16 Feb 2022 14:50:40 +0000 (11:50 -0300)
committerFridolin Somers <fridolin.somers@biblibre.com>
Tue, 22 Feb 2022 01:15:47 +0000 (15:15 -1000)
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
t/db_dependent/api/v1/patrons.t

index ba064b6..9f052cf 100755 (executable)
@@ -52,7 +52,8 @@ subtest 'list() tests' => sub {
     $schema->storage->txn_rollback;
 
     subtest 'librarian access tests' => sub {
-        plan tests => 17;
+
+        plan tests => 19;
 
         $schema->storage->txn_begin;
 
@@ -90,6 +91,11 @@ subtest 'list() tests' => sub {
           ->json_is( '/0/restricted' => Mojo::JSON->true )
           ->json_hasnt('/1');
 
+        $t->get_ok( "//$userid:$password@/api/v1/patrons?"
+              . 'q={"extended_attributes.type":"CODE"}' =>
+              { 'x-koha-embed' => 'extended_attributes' } )
+          ->status_is( 200, "Works, doesn't explode" );
+
         subtest 'searching date and date-time fields' => sub {
 
             plan tests => 12;