Lines 38-43
my $biblio = $builder->build( { source => 'Biblio' } );
Link Here
|
38 |
my $itemtype = $builder->build( { source => 'Itemtype' } ); |
38 |
my $itemtype = $builder->build( { source => 'Itemtype' } ); |
39 |
my $item = $builder->build( { source => 'Item', value => { biblionumber => $biblio->{biblionumber}, itype => $itemtype->{itemtype}, holdingbranch => $library->{branchcode} } } ); |
39 |
my $item = $builder->build( { source => 'Item', value => { biblionumber => $biblio->{biblionumber}, itype => $itemtype->{itemtype}, holdingbranch => $library->{branchcode} } } ); |
40 |
my $checkout = $builder->build( { source => 'Issue', value => { borrowernumber => 5, itemnumber => $item->{itemnumber} } } ); |
40 |
my $checkout = $builder->build( { source => 'Issue', value => { borrowernumber => 5, itemnumber => $item->{itemnumber} } } ); |
|
|
41 |
my $nb_of_recalls = Koha::Recalls->search->count; |
41 |
|
42 |
|
42 |
# recall requested by second patron |
43 |
# recall requested by second patron |
43 |
my $recall = Koha::Recall->new({ |
44 |
my $recall = Koha::Recall->new({ |
Lines 50-56
my $recall = Koha::Recall->new({
Link Here
|
50 |
itemtype => $item->{itype}, |
51 |
itemtype => $item->{itype}, |
51 |
})->store; |
52 |
})->store; |
52 |
|
53 |
|
53 |
is( Koha::Recalls->search->count, 1, 'The one recall should be added' ); |
54 |
is( Koha::Recalls->search->count, $nb_of_recalls + 1, 'The one recall should have be added' ); |
54 |
is( $recall->is_requested, 1, 'Recall status is set to R, requested' ); |
55 |
is( $recall->is_requested, 1, 'Recall status is set to R, requested' ); |
55 |
|
56 |
|
56 |
$recall->update({ status => 'O' }); |
57 |
$recall->update({ status => 'O' }); |
57 |
- |
|
|