Bug 19455: Prevent SwitchOnSiteCheckouts.t to fail randomly
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Thu, 12 Oct 2017 14:19:40 +0000 (11:19 -0300)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Thu, 12 Oct 2017 14:20:41 +0000 (11:20 -0300)
If categorycode is 'X', the test will fail

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

index 3397e23..8a7fb52 100644 (file)
@@ -50,11 +50,13 @@ my $branch = $builder->build({
     source => 'Branch',
 });
 
+my $patron_category = $builder->build({ source => 'Category', value => { categorycode => 'NOT_X', category_type => 'P', enrolmentfee => 0 } });
 my $patron = $builder->build({
     source => 'Borrower',
     value => {
         branchcode => $branch->{branchcode},
         debarred => undef,
+        categorycode => $patron_category->{categorycode},
     },
 });