Lines 6-12
use t::lib::Mocks;
Link Here
|
6 |
use C4::Context; |
6 |
use C4::Context; |
7 |
use C4::Branch; |
7 |
use C4::Branch; |
8 |
|
8 |
|
9 |
use Test::More tests => 51; |
9 |
use Test::More tests => 56; |
10 |
use MARC::Record; |
10 |
use MARC::Record; |
11 |
use C4::Biblio; |
11 |
use C4::Biblio; |
12 |
use C4::Items; |
12 |
use C4::Items; |
Lines 70-76
foreach my $borrowernumber ( @borrowernumbers ) {
Link Here
|
70 |
$borrowernumber, |
70 |
$borrowernumber, |
71 |
$biblionumber, |
71 |
$biblionumber, |
72 |
my $bibitems = q{}, |
72 |
my $bibitems = q{}, |
73 |
my $priority, |
73 |
my $priority = 1, |
74 |
my $resdate, |
74 |
my $resdate, |
75 |
my $expdate, |
75 |
my $expdate, |
76 |
my $notes = q{}, |
76 |
my $notes = q{}, |
Lines 80-89
foreach my $borrowernumber ( @borrowernumbers ) {
Link Here
|
80 |
); |
80 |
); |
81 |
} |
81 |
} |
82 |
|
82 |
|
83 |
|
|
|
84 |
my $reserves = GetReservesFromBiblionumber({ biblionumber => $biblionumber }); |
83 |
my $reserves = GetReservesFromBiblionumber({ biblionumber => $biblionumber }); |
85 |
is( scalar(@$reserves), $borrowers_count, "Test GetReserves()" ); |
84 |
is( scalar(@$reserves), $borrowers_count, "Test GetReserves()" ); |
86 |
|
85 |
|
|
|
86 |
is( $reserves->[0]->{priority}, 1, "Reserve 1 has a priority of 1" ); |
87 |
is( $reserves->[1]->{priority}, 2, "Reserve 2 has a priority of 2" ); |
88 |
is( $reserves->[2]->{priority}, 3, "Reserve 3 has a priority of 3" ); |
89 |
is( $reserves->[3]->{priority}, 4, "Reserve 4 has a priority of 4" ); |
90 |
is( $reserves->[4]->{priority}, 5, "Reserve 5 has a priority of 5" ); |
87 |
|
91 |
|
88 |
my ( $reservedate, $borrowernumber, $branchcode, $reserve_id ) = GetReservesFromItemnumber($itemnumber); |
92 |
my ( $reservedate, $borrowernumber, $branchcode, $reserve_id ) = GetReservesFromItemnumber($itemnumber); |
89 |
is( $reservedate, output_pref({ dt => dt_from_string, dateformat => 'iso', dateonly => 1 }), "GetReservesFromItemnumber should return a valid reserve date"); |
93 |
is( $reservedate, output_pref({ dt => dt_from_string, dateformat => 'iso', dateonly => 1 }), "GetReservesFromItemnumber should return a valid reserve date"); |
90 |
- |
|
|