Bug 32268: Prevent XSLT.t to fail randomly
Can't call method "itemnumber" on an undefined value at /kohadevbox/koha/Koha/Recall.pm line 343. We should set item_level and not let TestBuilder pick a value. This may have been caught (make it more obvious) by the recent change to TestBuilder for boolean (Bug 32030: fix test builder for boolean) Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
parent
3d8ff90a8f
commit
cb7b9b37c9
|
|
@ -133,11 +133,17 @@ subtest 'buildKohaItemsNamespace status tests' => sub {
|
|||
like($xml,qr{<resultbranch>${library_name}</resultbranch>}, "Found resultbranch / holding branch" );
|
||||
|
||||
t::lib::Mocks::mock_preference('UseRecalls', 1);
|
||||
my $recall = $builder->build_object({ class => 'Koha::Recalls', value => {
|
||||
biblio_id => $item->biblionumber,
|
||||
item_id => $item->itemnumber,
|
||||
pickup_library_id => $item->holdingbranch,
|
||||
}});
|
||||
my $recall = $builder->build_object(
|
||||
{
|
||||
class => 'Koha::Recalls',
|
||||
value => {
|
||||
biblio_id => $item->biblionumber,
|
||||
item_id => $item->itemnumber,
|
||||
pickup_library_id => $item->holdingbranch,
|
||||
item_level => 1,
|
||||
}
|
||||
}
|
||||
);
|
||||
$recall->set_waiting;
|
||||
$xml = C4::XSLT::buildKohaItemsNamespace( $item->biblionumber,[]);
|
||||
like($xml,qr{<substatus>Recall waiting</substatus>},"Waiting status takes precedence over In transit (recalls)");
|
||||
|
|
|
|||
Loading…
Reference in New Issue