Lines 19-29
Link Here
|
19 |
|
19 |
|
20 |
use Modern::Perl; |
20 |
use Modern::Perl; |
21 |
|
21 |
|
22 |
use Test::More tests => 3; |
22 |
use Test::More tests => 4; |
23 |
|
23 |
|
24 |
use C4::Reserves; |
24 |
use C4::Reserves; |
25 |
|
25 |
|
26 |
use Koha::DateUtils qw( dt_from_string ); |
26 |
use Koha::DateUtils qw( dt_from_string output_pref ); |
27 |
use Koha::Biblios; |
27 |
use Koha::Biblios; |
28 |
use Koha::Patrons; |
28 |
use Koha::Patrons; |
29 |
use Koha::Subscriptions; |
29 |
use Koha::Subscriptions; |
Lines 45-50
my $biblioitem = $schema->resultset('Biblioitem')->new(
Link Here
|
45 |
} |
45 |
} |
46 |
)->insert(); |
46 |
)->insert(); |
47 |
|
47 |
|
|
|
48 |
subtest 'store' => sub { |
49 |
plan tests => 1; |
50 |
is( |
51 |
Koha::Biblios->find( $biblio->biblionumber )->datecreated, |
52 |
output_pref( |
53 |
{ dt => dt_from_string, dateformat => 'iso', dateonly => 1 } |
54 |
), |
55 |
"datecreated must be set to today if not passed to the constructor" |
56 |
); |
57 |
}; |
58 |
|
48 |
subtest 'holds + current_holds' => sub { |
59 |
subtest 'holds + current_holds' => sub { |
49 |
plan tests => 5; |
60 |
plan tests => 5; |
50 |
C4::Reserves::AddReserve( $patron->branchcode, $patron->borrowernumber, $biblio->biblionumber ); |
61 |
C4::Reserves::AddReserve( $patron->branchcode, $patron->borrowernumber, $biblio->biblionumber ); |
51 |
- |
|
|