X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=t%2Fdb_dependent%2FReserves.t;h=5b4c681954b3c8c37e378177d21c27ed5aacf994;hb=102b1ca4bf3b1721f496417473643ff951c13833;hp=92f7303a23deaaf633eb600968e9dd165fe18a60;hpb=870191d40611e3e7414388d4dd911446a2059225;p=koha.git diff --git a/t/db_dependent/Reserves.t b/t/db_dependent/Reserves.t index 92f7303a23..5b4c681954 100755 --- a/t/db_dependent/Reserves.t +++ b/t/db_dependent/Reserves.t @@ -17,7 +17,7 @@ use Modern::Perl; -use Test::More tests => 58; +use Test::More tests => 59; use Test::MockModule; use Test::Warn; @@ -90,6 +90,10 @@ my ( $item_bibnum, $item_bibitemnum, $itemnumber ) = AddItem( $bibnum ); +my $biblio_with_no_item = $builder->build({ + source => 'Biblio' +}); + # Modify item; setting barcode. my $testbarcode = '97531'; @@ -511,6 +515,8 @@ $borrower->{dateofbirth} = DateTime->now->add( years => -30 ); Koha::Patrons->find( $borrowernumber )->set({ dateofbirth => $borrower->{dateofbirth} })->store; is( C4::Reserves::CanBookBeReserved($borrowernumber, $biblionumber)->{status} , 'OK', "Reserving a 'PEGI 16' Biblio by a 30 year old borrower succeeds"); + +is( C4::Reserves::CanBookBeReserved($borrowernumber, $biblio_with_no_item->{biblionumber})->{status} , '', "Biblio with no item. Status is empty"); #### ####### EO Bug 13113 <<< ####