Bug 19529: Prevent NoIssuesChargeGuarantees.t to fail randomly
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Wed, 25 Oct 2017 16:16:53 +0000 (13:16 -0300)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Wed, 25 Oct 2017 16:16:53 +0000 (13:16 -0300)
Use a categorycode != "X"

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
t/db_dependent/Circulation/NoIssuesChargeGuarantees.t

index c5eda7b..201a765 100644 (file)
@@ -42,9 +42,13 @@ my $item = $builder->build(
     }
 );
 
+my $patron_category = $builder->build({ source => 'Category', value => { categorycode => 'NOT_X', category_type => 'P', enrolmentfee => 0 } });
 my $patron = $builder->build(
     {
         source => 'Borrower',
+        value => {
+            patron_category => $patron_category->{categorycode},
+        }
     }
 );
 my $guarantee = $builder->build(
@@ -52,6 +56,7 @@ my $guarantee = $builder->build(
         source => 'Borrower',
         value  => {
             guarantorid => $patron->{borrowernumber},
+            patron_category => $patron_category->{categorycode},
         }
     }
 );