|
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 => 46; |
4 |
use Test::More tests => 50; |
| 5 |
|
5 |
|
| 6 |
use MARC::Record; |
6 |
use MARC::Record; |
| 7 |
|
7 |
|
|
Lines 247-260
is( C4::Serials::can_show_subscription($subscription_from_another_branch), 1,
Link Here
|
| 247 |
$schema->storage->txn_rollback; |
247 |
$schema->storage->txn_rollback; |
| 248 |
|
248 |
|
| 249 |
# GetPreviousSerialid |
249 |
# GetPreviousSerialid |
| 250 |
my $serialid1 = NewIssue( 1, $subscriptionid, $biblionumber, 2 ); |
250 |
my $serialid1 = NewIssue( 1, $subscriptionid_from_my_branch, $biblionumber, 2 ); |
| 251 |
my $serialid2 = NewIssue( 2, $subscriptionid, $biblionumber, 2 ); |
251 |
my $serialid2 = NewIssue( 2, $subscriptionid_from_my_branch, $biblionumber, 2 ); |
| 252 |
my $serialid3 = NewIssue( 3, $subscriptionid, $biblionumber, 2 ); |
252 |
my $serialid3 = NewIssue( 3, $subscriptionid_from_my_branch, $biblionumber, 2 ); |
| 253 |
|
253 |
|
| 254 |
is( GetPreviousSerialid( $subscriptionid ), $serialid2, "get previous serialid without parameter"); |
254 |
is( GetPreviousSerialid( $subscriptionid_from_my_branch ), $serialid2, "get previous serialid without parameter"); |
| 255 |
is( GetPreviousSerialid( $subscriptionid, 1 ), $serialid2, "get previous serialid with 1" ); |
255 |
is( GetPreviousSerialid( $subscriptionid_from_my_branch, 1 ), $serialid2, "get previous serialid with 1" ); |
| 256 |
is( GetPreviousSerialid( $subscriptionid, 2 ), $serialid1, "get previous serialid with 2" ); |
256 |
is( GetPreviousSerialid( $subscriptionid_from_my_branch, 2 ), $serialid1, "get previous serialid with 2" ); |
| 257 |
is( GetPreviousSerialid( $subscriptionid, 3 ), undef, "get previous serialid with 3, does not exist" ); |
257 |
is( GetPreviousSerialid( $subscriptionid_from_my_branch, 3 ), undef, "get previous serialid with 3, does not exist" ); |
| 258 |
|
258 |
|
| 259 |
$dbh->rollback; |
259 |
$dbh->rollback; |
| 260 |
|
260 |
|
| 261 |
- |
|
|