|
Lines 133-143
subtest 'buildKohaItemsNamespace status tests' => sub {
Link Here
|
| 133 |
like($xml,qr{<resultbranch>${library_name}</resultbranch>}, "Found resultbranch / holding branch" ); |
133 |
like($xml,qr{<resultbranch>${library_name}</resultbranch>}, "Found resultbranch / holding branch" ); |
| 134 |
|
134 |
|
| 135 |
t::lib::Mocks::mock_preference('UseRecalls', 1); |
135 |
t::lib::Mocks::mock_preference('UseRecalls', 1); |
| 136 |
my $recall = $builder->build_object({ class => 'Koha::Recalls', value => { |
136 |
my $recall = $builder->build_object( |
| 137 |
biblio_id => $item->biblionumber, |
137 |
{ |
| 138 |
item_id => $item->itemnumber, |
138 |
class => 'Koha::Recalls', |
| 139 |
pickup_library_id => $item->holdingbranch, |
139 |
value => { |
| 140 |
}}); |
140 |
biblio_id => $item->biblionumber, |
|
|
141 |
item_id => $item->itemnumber, |
| 142 |
pickup_library_id => $item->holdingbranch, |
| 143 |
item_level => 1, |
| 144 |
} |
| 145 |
} |
| 146 |
); |
| 141 |
$recall->set_waiting; |
147 |
$recall->set_waiting; |
| 142 |
$xml = C4::XSLT::buildKohaItemsNamespace( $item->biblionumber,[]); |
148 |
$xml = C4::XSLT::buildKohaItemsNamespace( $item->biblionumber,[]); |
| 143 |
like($xml,qr{<substatus>Recall waiting</substatus>},"Waiting status takes precedence over In transit (recalls)"); |
149 |
like($xml,qr{<substatus>Recall waiting</substatus>},"Waiting status takes precedence over In transit (recalls)"); |
| 144 |
- |
|
|