View | Details | Raw Unified | Return to bug 20469
Collapse All | Expand All

(-)a/Koha/Holds.pm (+12 lines)
Lines 49-54 sub waiting { Link Here
49
    return $self->search( { found => 'W' } );
49
    return $self->search( { found => 'W' } );
50
}
50
}
51
51
52
=head3 waiting_or_transit
53
54
returns a set of holds that are waiting or in transit
55
56
=cut
57
58
sub waiting_or_transit {
59
    my ( $self ) = @_;
60
61
    return $self->search({ found => ['W', 'T'] });
62
}
63
52
=head3 unfilled
64
=head3 unfilled
53
65
54
returns a set of holds that are unfilled from an existing set
66
returns a set of holds that are unfilled from an existing set
(-)a/t/db_dependent/Holds.t (-2 / +2 lines)
Lines 7-13 use t::lib::TestBuilder; Link Here
7
7
8
use C4::Context;
8
use C4::Context;
9
9
10
use Test::More tests => 55;
10
use Test::More tests => 56;
11
use MARC::Record;
11
use MARC::Record;
12
use C4::Biblio;
12
use C4::Biblio;
13
use C4::Items;
13
use C4::Items;
Lines 120-125 ok( $hold_branch == $hold->branch(), "branch method returns stashed branch" ); Link Here
120
my $hold_found = $hold->found();
120
my $hold_found = $hold->found();
121
$hold->set({ found => 'W'})->store();
121
$hold->set({ found => 'W'})->store();
122
is( Koha::Holds->waiting()->count(), 1, "Koha::Holds->waiting returns waiting holds" );
122
is( Koha::Holds->waiting()->count(), 1, "Koha::Holds->waiting returns waiting holds" );
123
is( Koha::Holds->waiting_or_transit->count, 1, "Koha::Holds->waiting_or_transit returns 1 too" );
123
is( Koha::Holds->unfilled()->count(), 4, "Koha::Holds->unfilled returns unfilled holds" );
124
is( Koha::Holds->unfilled()->count(), 4, "Koha::Holds->unfilled returns unfilled holds" );
124
125
125
my $patron = Koha::Patrons->find( $borrowernumbers[0] );
126
my $patron = Koha::Patrons->find( $borrowernumbers[0] );
126
- 

Return to bug 20469