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

(-)a/C4/Serials.pm (-1 / +1 lines)
Lines 2700-2706 sub _can_do_on_subscription { Link Here
2700
2700
2701
=head2 findSerialsByStatus
2701
=head2 findSerialsByStatus
2702
2702
2703
    @serials = findSerialByStatus($status, $subscriptionid);
2703
    @serials = findSerialsByStatus($status, $subscriptionid);
2704
2704
2705
    Returns an array of serials matching a given status and subscription id.
2705
    Returns an array of serials matching a given status and subscription id.
2706
2706
(-)a/t/db_dependent/Serials.t (-2 / +1 lines)
Lines 221-227 for my $status ( @statuses ) { Link Here
221
}
221
}
222
# Here we have 15 serials with statuses : 2*2 + 5*3 + 2*4 + 1*41 + 1*42 + 1*43 + 1*44 + 1*5 + 1*1
222
# Here we have 15 serials with statuses : 2*2 + 5*3 + 2*4 + 1*41 + 1*42 + 1*43 + 1*44 + 1*5 + 1*1
223
my @serialsByStatus = C4::Serials::findSerialsByStatus(2,$subscriptionid);
223
my @serialsByStatus = C4::Serials::findSerialsByStatus(2,$subscriptionid);
224
is(@serialsByStatus,2,"findSerialByStatus returns all serials with chosen status");
224
is(@serialsByStatus,2,"findSerialsByStatus returns all serials with chosen status");
225
( $total_issues, @serials ) = C4::Serials::GetSerials( $subscriptionid );
225
( $total_issues, @serials ) = C4::Serials::GetSerials( $subscriptionid );
226
is( $total_issues, @statuses + 1, "GetSerials returns total_issues" );
226
is( $total_issues, @statuses + 1, "GetSerials returns total_issues" );
227
my @arrived_missing = map { my $status = $_->{status}; ( grep { /^$status$/ } qw( 2 4 41 42 43 44 5 ) ) ? $_ : () } @serials;
227
my @arrived_missing = map { my $status = $_->{status}; ( grep { /^$status$/ } qw( 2 4 41 42 43 44 5 ) ) ? $_ : () } @serials;
228
- 

Return to bug 12748