Bug 31086: (QA follow-up) Fix failing tests
This test was missed first time around, branchcode needed adding to all the calls to AddReserve. Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> (cherry picked from commitbdddc7ee0a) Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> (cherry picked from commit51f33cbc20) Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
This commit is contained in:
parent
e416ab92fe
commit
503b67cbdd
|
|
@ -431,10 +431,13 @@ subtest 'get_items_that_can_fill' => sub {
|
|||
my $patron_2 = $builder->build_object( { class => 'Koha::Patrons' } );
|
||||
my $patron_3 = $builder->build_object( { class => 'Koha::Patrons' } );
|
||||
|
||||
my $library_1 = $builder->build_object( { class => 'Koha::Libraries' } );
|
||||
|
||||
t::lib::Mocks::mock_userenv( { patron => $patron_1 } );
|
||||
|
||||
my $reserve_id_1 = C4::Reserves::AddReserve(
|
||||
{
|
||||
branchcode => $library_1->branchcode,
|
||||
borrowernumber => $patron_1->borrowernumber,
|
||||
biblionumber => $biblio->biblionumber,
|
||||
priority => 1,
|
||||
|
|
@ -448,6 +451,7 @@ subtest 'get_items_that_can_fill' => sub {
|
|||
|
||||
my $reserve_id_2 = C4::Reserves::AddReserve(
|
||||
{
|
||||
branchcode => $library_1->branchcode,
|
||||
borrowernumber => $patron_2->borrowernumber,
|
||||
biblionumber => $biblio->biblionumber,
|
||||
priority => 2,
|
||||
|
|
@ -457,6 +461,7 @@ subtest 'get_items_that_can_fill' => sub {
|
|||
|
||||
my $waiting_reserve_id = C4::Reserves::AddReserve(
|
||||
{
|
||||
branchcode => $library_1->branchcode,
|
||||
borrowernumber => $patron_2->borrowernumber,
|
||||
biblionumber => $biblio->biblionumber,
|
||||
priority => 0,
|
||||
|
|
@ -465,6 +470,16 @@ subtest 'get_items_that_can_fill' => sub {
|
|||
}
|
||||
);
|
||||
|
||||
my $notforloan_reserve_id = C4::Reserves::AddReserve(
|
||||
{
|
||||
branchcode => $library_1->branchcode,
|
||||
borrowernumber => $patron_2->borrowernumber,
|
||||
biblionumber => $biblio->biblionumber,
|
||||
priority => 0,
|
||||
itemnumber => $notforloan->itemnumber,
|
||||
}
|
||||
);
|
||||
|
||||
# item 3 is on loan
|
||||
AddIssue( $patron_3->unblessed, $item_3->barcode );
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue