Lines 51-60
C4::Context->_new_userenv('xxx');
Link Here
|
51 |
C4::Context->set_userenv( 0, 0, 0, 'firstname', 'surname', $library->{branchcode}, 'Midway Public Library', '', '', '' ); |
51 |
C4::Context->set_userenv( 0, 0, 0, 'firstname', 'surname', $library->{branchcode}, 'Midway Public Library', '', '', '' ); |
52 |
is( C4::Context->userenv->{branch}, $library->{branchcode}, 'userenv set' ); |
52 |
is( C4::Context->userenv->{branch}, $library->{branchcode}, 'userenv set' ); |
53 |
|
53 |
|
|
|
54 |
my $patron_category = $builder->build({ source => 'Category', value => { categorycode => 'NOT_X', category_type => 'P', enrolmentfee => 0 } }); |
54 |
my @patrons; |
55 |
my @patrons; |
55 |
for my $i ( 1 .. 20 ) { |
56 |
for my $i ( 1 .. 20 ) { |
56 |
my $patron = Koha::Patron->new( |
57 |
my $patron = Koha::Patron->new( |
57 |
{ cardnumber => $i, firstname => 'Kyle', surname => 'Hall', categorycode => $category->{categorycode}, branchcode => $library->{branchcode} } ) |
58 |
{ cardnumber => $i, firstname => 'Kyle', surname => 'Hall', categorycode => $category->{categorycode}, branchcode => $library->{branchcode}, categorycode => $patron_category->{categorycode}, } ) |
58 |
->store(); |
59 |
->store(); |
59 |
push( @patrons, $patron ); |
60 |
push( @patrons, $patron ); |
60 |
} |
61 |
} |
Lines 183-189
is( $data->{exceeded}, 1, "Should exceed threshold with one withdrawn item" );
Link Here
|
183 |
|
184 |
|
184 |
t::lib::Mocks::mock_preference('CircControl', 'PatronLibrary'); |
185 |
t::lib::Mocks::mock_preference('CircControl', 'PatronLibrary'); |
185 |
|
186 |
|
186 |
my ( undef, $needsconfirmation ) = CanBookBeIssued( $patron_hr, $item->barcode ); |
187 |
my ( $un, $needsconfirmation ) = CanBookBeIssued( $patron_hr, $item->barcode ); |
187 |
ok( $needsconfirmation->{HIGHHOLDS}, "High holds checkout needs confirmation" ); |
188 |
ok( $needsconfirmation->{HIGHHOLDS}, "High holds checkout needs confirmation" ); |
188 |
|
189 |
|
189 |
( undef, $needsconfirmation ) = CanBookBeIssued( $patron_hr, $item->barcode, undef, undef, undef, { override_high_holds => 1 } ); |
190 |
( undef, $needsconfirmation ) = CanBookBeIssued( $patron_hr, $item->barcode, undef, undef, undef, { override_high_holds => 1 } ); |
190 |
- |
|
|