Bug 23211: Prevent SIP/Transaction.t to fail randomly
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Tue, 25 Jun 2019 22:43:41 +0000 (17:43 -0500)
committerMartin Renvoize <martin.renvoize@ptfs-europe.com>
Wed, 26 Jun 2019 08:01:17 +0000 (09:01 +0100)
The checkout failed because patron's category is the one used for statistics (category_type=X).

To recreate the failure:
modified: t/db_dependent/SIP/Transaction.t
@ Transaction.t:37 @ subtest fill_holds_at_checkout => sub {
     plan tests => 6;

-    my $category = $builder->build({ source => 'Category' });
+    my $category = $builder->build({ source => 'Category', value => { category_type => 'X' }});
     my $branch   = $builder->build({ source => 'Branch' });
     my $borrower = $builder->build({ source => 'Borrower', value =>{
         branchcode => $branch->{branchcode},

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

t/db_dependent/SIP/Transaction.t

index 0e78505..076fb29 100755 (executable)
@@ -34,7 +34,7 @@ subtest fill_holds_at_checkout => sub {
     plan tests => 6;
 
 
-    my $category = $builder->build({ source => 'Category' });
+    my $category = $builder->build({ source => 'Category', value => { category_type => 'A' }});
     my $branch   = $builder->build({ source => 'Branch' });
     my $borrower = $builder->build({ source => 'Borrower', value =>{
         branchcode => $branch->{branchcode},