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

(-)a/t/db_dependent/Serials.t (-3 / +11 lines)
Lines 5-11 Link Here
5
5
6
use Modern::Perl;
6
use Modern::Perl;
7
7
8
use 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 );
8
use C4::Serials qw( getroutinglist 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 );
9
use C4::Serials::Frequency;
9
use C4::Serials::Frequency;
10
use C4::Serials::Numberpattern;
10
use C4::Serials::Numberpattern;
11
use C4::Biblio qw( AddBiblio GetMarcFromKohaField );
11
use C4::Biblio qw( AddBiblio GetMarcFromKohaField );
Lines 17-23 use Koha::Acquisition::Booksellers; Link Here
17
use t::lib::Mocks;
17
use t::lib::Mocks;
18
use t::lib::TestBuilder;
18
use t::lib::TestBuilder;
19
use Test::MockModule;
19
use Test::MockModule;
20
use Test::More tests => 57;
20
use Test::More tests => 63;
21
21
22
BEGIN {
22
BEGIN {
23
    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 ));
23
    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 227-232 my $patronid2 = $patron2->borrowernumber; Link Here
227
addroutingmember( $patronid1, $subscriptionwithroutinglistid );
227
addroutingmember( $patronid1, $subscriptionwithroutinglistid );
228
addroutingmember( $patronid2, $subscriptionwithroutinglistid );
228
addroutingmember( $patronid2, $subscriptionwithroutinglistid );
229
229
230
my @routinglist = getroutinglist($subscriptionwithroutinglistid);
231
232
is( scalar @routinglist,               2,             'Two members on the routing list' );
233
is( $routinglist[0]->{biblionumber},   $biblionumber, 'biblionumber is correct' );
234
is( $routinglist[1]->{biblionumber},   $biblionumber, 'biblionumber is correct' );
235
is( $routinglist[0]->{borrowernumber}, $patronid1,    'First patron added has the lowest rank' );
236
is( $routinglist[0]->{ranking},        1,             'Rank 1 set for first subscription list member' );
237
is( $routinglist[1]->{ranking},        2, 'Next rank value set for the second added subscription list member' );
238
230
# Perform SearchSubscriptions
239
# Perform SearchSubscriptions
231
my $fake_subscription = GetSubscription($subscriptionwithroutinglistid);
240
my $fake_subscription = GetSubscription($subscriptionwithroutinglistid);
232
241
233
- 

Return to bug 37476