Bug 23211: Prevent SIP/Transaction.t to fail randomly

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>
(cherry picked from commit 466f99e442)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit a38bc66100)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This commit is contained in:
Jonathan Druart 2019-06-25 17:43:41 -05:00 committed by Lucas Gass
parent f8b7a5f5e1
commit 496e507122
1 changed files with 1 additions and 1 deletions

View File

@ -34,7 +34,7 @@ subtest fill_holds_at_checkout => sub {
plan tests => 5;
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},