Lines 100-112
subtest 'waiting_or_in_transit' => sub {
Link Here
|
100 |
$reserve = Koha::Holds->find($reserve->{reserve_id}); |
100 |
$reserve = Koha::Holds->find($reserve->{reserve_id}); |
101 |
$biblio = Koha::Biblios->find($biblio->{biblionumber}); |
101 |
$biblio = Koha::Biblios->find($biblio->{biblionumber}); |
102 |
|
102 |
|
103 |
is($biblio->hasItemswaitingOrInTransit, 0, 'Item is neither waiting nor in transit'); |
103 |
is($biblio->has_items_waiting_or_intransit, 0, 'Item is neither waiting nor in transit'); |
104 |
|
104 |
|
105 |
$reserve->found('W')->store; |
105 |
$reserve->found('W')->store; |
106 |
is($biblio->hasItemswaitingOrInTransit, 1, 'Item is waiting'); |
106 |
is($biblio->has_items_waiting_or_intransit, 1, 'Item is waiting'); |
107 |
|
107 |
|
108 |
$reserve->found('T')->store; |
108 |
$reserve->found('T')->store; |
109 |
is($biblio->hasItemswaitingOrInTransit, 1, 'Item is in transit'); |
109 |
is($biblio->has_items_waiting_or_intransit, 1, 'Item is in transit'); |
110 |
|
110 |
|
111 |
my $transfer = $builder->build({ |
111 |
my $transfer = $builder->build({ |
112 |
source => 'Branchtransfer', |
112 |
source => 'Branchtransfer', |
Lines 117-123
subtest 'waiting_or_in_transit' => sub {
Link Here
|
117 |
}); |
117 |
}); |
118 |
my $t = Koha::Database->new()->schema()->resultset( 'Branchtransfer' )->find($transfer->{branchtransfer_id}); |
118 |
my $t = Koha::Database->new()->schema()->resultset( 'Branchtransfer' )->find($transfer->{branchtransfer_id}); |
119 |
$reserve->found(undef)->store; |
119 |
$reserve->found(undef)->store; |
120 |
is($biblio->hasItemswaitingOrInTransit, 1, 'Item has transfer'); |
120 |
is($biblio->has_items_waiting_or_intransit, 1, 'Item has transfer'); |
121 |
}; |
121 |
}; |
122 |
|
122 |
|
123 |
$schema->storage->txn_rollback; |
123 |
$schema->storage->txn_rollback; |
124 |
- |
|
|