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

(-)a/t/db_dependent/Serials_2.t (-10 / +9 lines)
Lines 1-7 Link Here
1
#!/usr/bin/perl
1
#!/usr/bin/perl
2
use Modern::Perl;
2
use Modern::Perl;
3
3
4
use Test::More tests => 36;
4
use Test::More tests => 40;
5
5
6
use MARC::Record;
6
use MARC::Record;
7
7
Lines 205-218 is( C4::Serials::can_show_subscription($subscription_from_another_branch), 1, Link Here
205
);
205
);
206
206
207
# GetPreviousSerialid
207
# GetPreviousSerialid
208
my $serialid1 = NewIssue( 1, $subscriptionid, $biblionumber, 2 );
208
my $serialid1 = NewIssue( 1, $subscriptionid_from_my_branch, $biblionumber, 2 );
209
my $serialid2 = NewIssue( 2, $subscriptionid, $biblionumber, 2 );
209
my $serialid2 = NewIssue( 2, $subscriptionid_from_my_branch, $biblionumber, 2 );
210
my $serialid3 = NewIssue( 3, $subscriptionid, $biblionumber, 2 );
210
my $serialid3 = NewIssue( 3, $subscriptionid_from_my_branch, $biblionumber, 2 );
211
211
212
is( GetPreviousSerialid( $subscriptionid ), $serialid2, "get previous serialid without parameter");
212
is( GetPreviousSerialid( $subscriptionid_from_my_branch ), $serialid2, "get previous serialid without parameter");
213
is( GetPreviousSerialid( $subscriptionid, 1 ), $serialid2, "get previous serialid with 1" );
213
is( GetPreviousSerialid( $subscriptionid_from_my_branch, 1 ), $serialid2, "get previous serialid with 1" );
214
is( GetPreviousSerialid( $subscriptionid, 2 ), $serialid1, "get previous serialid with 2" );
214
is( GetPreviousSerialid( $subscriptionid_from_my_branch, 2 ), $serialid1, "get previous serialid with 2" );
215
is( GetPreviousSerialid( $subscriptionid, 3 ), undef, "get previous serialid with 3, does not exist" );
215
is( GetPreviousSerialid( $subscriptionid_from_my_branch, 3 ), undef, "get previous serialid with 3, does not exist" );
216
216
217
$dbh->rollback;
217
$dbh->rollback;
218
218
219
- 

Return to bug 7677