Lines 16-22
use Koha::DateUtils qw( dt_from_string output_pref );
Link Here
|
16 |
use Koha::Acquisition::Booksellers; |
16 |
use Koha::Acquisition::Booksellers; |
17 |
use t::lib::Mocks; |
17 |
use t::lib::Mocks; |
18 |
use t::lib::TestBuilder; |
18 |
use t::lib::TestBuilder; |
19 |
use Test::More tests => 49; |
19 |
use Test::More tests => 50; |
20 |
|
20 |
|
21 |
BEGIN { |
21 |
BEGIN { |
22 |
use_ok('C4::Serials', qw( updateClaim NewSubscription GetSubscription GetSubscriptionHistoryFromSubscriptionId SearchSubscriptions ModSubscription GetExpirationDate GetSerials GetSerialInformation NewIssue AddItem2Serial DelSubscription GetFullSubscription PrepareSerialsData GetSubscriptionsFromBiblionumber ModSubscriptionHistory GetSerials2 GetLatestSerials GetNextSeq GetSeq CountSubscriptionFromBiblionumber ModSerialStatus findSerialsByStatus HasSubscriptionStrictlyExpired HasSubscriptionExpired GetLateOrMissingIssues check_routing addroutingmember GetNextDate )); |
22 |
use_ok('C4::Serials', qw( updateClaim NewSubscription GetSubscription GetSubscriptionHistoryFromSubscriptionId SearchSubscriptions ModSubscription GetExpirationDate GetSerials GetSerialInformation NewIssue AddItem2Serial DelSubscription GetFullSubscription PrepareSerialsData GetSubscriptionsFromBiblionumber ModSubscriptionHistory GetSerials2 GetLatestSerials GetNextSeq GetSeq CountSubscriptionFromBiblionumber ModSerialStatus findSerialsByStatus HasSubscriptionStrictlyExpired HasSubscriptionExpired GetLateOrMissingIssues check_routing addroutingmember GetNextDate )); |
Lines 451-453
subtest "NewSubscription|ModSubscription" => sub {
Link Here
|
451 |
is( $serials->count, 1, "Still only one serial" ); |
451 |
is( $serials->count, 1, "Still only one serial" ); |
452 |
is( $serials->next->biblionumber, $biblio_2->biblionumber, 'ModSubscription should have updated serial.biblionumber'); |
452 |
is( $serials->next->biblionumber, $biblio_2->biblionumber, 'ModSubscription should have updated serial.biblionumber'); |
453 |
}; |
453 |
}; |
454 |
- |
454 |
|
|
|
455 |
subtest "_numeration" => sub { |
456 |
|
457 |
plan tests => 6; |
458 |
|
459 |
my $s = C4::Serials::_numeration(0, 'monthname', 'cat'); |
460 |
is( $s, "gener" ); |
461 |
$s = C4::Serials::_numeration(0, 'monthname', 'es'); |
462 |
is( $s, "enero" ); |
463 |
$s = C4::Serials::_numeration(0, 'monthname', 'fr'); |
464 |
is( $s, "janvier" ); |
465 |
|
466 |
$s = C4::Serials::_numeration(0, 'monthabrv', 'cat'); |
467 |
is( $s, "de gen." ); |
468 |
$s = C4::Serials::_numeration(0, 'monthabrv', 'es'); |
469 |
is( $s, "ene" ); |
470 |
$s = C4::Serials::_numeration(0, 'monthabrv', 'fr'); |
471 |
is( $s, "janv." ); |
472 |
}; |