Bug 19776: Fix random failures (category_type vs categorycode='X')

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
Jonathan Druart 2017-12-07 14:42:03 -03:00
parent 54053cb475
commit d203cbbe8e
6 changed files with 6 additions and 6 deletions

View File

@ -63,7 +63,7 @@ my $itemtype = $builder->build(
value => { notforloan => undef, rentalcharge => 0, defaultreplacecost => undef, processfee => undef }
}
)->{itemtype};
my $patron_category = $builder->build({ source => 'Category', value => { categorycode => 'NOT_X', category_type => 'P', enrolmentfee => 0 } });
my $patron_category = $builder->build({ source => 'Category', value => { category_type => 'NOT_X', category_type => 'P', enrolmentfee => 0 } });
my $CircControl = C4::Context->preference('CircControl');
my $HomeOrHoldingBranch = C4::Context->preference('HomeOrHoldingBranch');

View File

@ -39,7 +39,7 @@ my $library = $builder->build({ source => 'Branch' });
C4::Context->_new_userenv('xxx');
C4::Context->set_userenv(0,0,0,'firstname','surname', $library->{branchcode}, $library->{branchname}, '', '', '');
my $patron_category = $builder->build({ source => 'Category', value => { categorycode => 'NOT_X', category_type => 'P', enrolmentfee => 0 } });
my $patron_category = $builder->build({ source => 'Category', value => { category_type => 'NOT_X', category_type => 'P', enrolmentfee => 0 } });
my $patron = $builder->build({ source => 'Borrower', value => { branchcode => $library->{branchcode}, categorycode => $patron_category->{categorycode} } } );
my $biblioitem = $builder->build( { source => 'Biblioitem' } );

View File

@ -42,7 +42,7 @@ my $item = $builder->build(
}
);
my $patron_category = $builder->build({ source => 'Category', value => { categorycode => 'NOT_X', category_type => 'P', enrolmentfee => 0 } });
my $patron_category = $builder->build({ source => 'Category', value => { category_type => 'NOT_X', category_type => 'P', enrolmentfee => 0 } });
my $patron = $builder->build(
{
source => 'Borrower',

View File

@ -50,7 +50,7 @@ my $branch = $builder->build({
source => 'Branch',
});
my $patron_category = $builder->build({ source => 'Category', value => { categorycode => 'NOT_X', category_type => 'P', enrolmentfee => 0 } });
my $patron_category = $builder->build({ source => 'Category', value => { category_type => 'NOT_X', category_type => 'P', enrolmentfee => 0 } });
my $patron = $builder->build({
source => 'Borrower',
value => {

View File

@ -34,7 +34,7 @@ my $builder = t::lib::TestBuilder->new();
$ENV{ DEBUG } = 0;
my $patron_category = $builder->build({ source => 'Category', value => { categorycode => 'NOT_X', category_type => 'P', enrolmentfee => 0 } });
my $patron_category = $builder->build({ source => 'Category', value => { category_type => 'NOT_X', category_type => 'P', enrolmentfee => 0 } });
subtest 'Tests for CanBookBeIssued related to dateexpiry' => sub {
plan tests => 4;

View File

@ -51,7 +51,7 @@ C4::Context->_new_userenv('xxx');
C4::Context->set_userenv( 0, 0, 0, 'firstname', 'surname', $library->{branchcode}, 'Midway Public Library', '', '', '' );
is( C4::Context->userenv->{branch}, $library->{branchcode}, 'userenv set' );
my $patron_category = $builder->build({ source => 'Category', value => { categorycode => 'NOT_X', category_type => 'P', enrolmentfee => 0 } });
my $patron_category = $builder->build({ source => 'Category', value => { category_type => 'NOT_X', category_type => 'P', enrolmentfee => 0 } });
my @patrons;
for my $i ( 1 .. 20 ) {
my $patron = Koha::Patron->new(