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

(-)a/t/db_dependent/Serials_2.t (-2 / +11 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 => 4;
4
use Test::More tests => 8;
5
5
6
use MARC::Record;
6
use MARC::Record;
7
use C4::Biblio qw( AddBiblio );
7
use C4::Biblio qw( AddBiblio );
Lines 69-72 my $subscription = GetSubscription( $subscriptionid ); Link Here
69
is( C4::Serials::can_edit_subscription($subscription), 1, "User can edit a subscription with an empty branchcode");
69
is( C4::Serials::can_edit_subscription($subscription), 1, "User can edit a subscription with an empty branchcode");
70
#TODO add UT when C4::Auth->set_permissions (or setuserflags) will exist.
70
#TODO add UT when C4::Auth->set_permissions (or setuserflags) will exist.
71
71
72
# GetPreviousSerialid
73
my $serialid1 = NewIssue( 1, $subscriptionid, $biblionumber, 2 );
74
my $serialid2 = NewIssue( 2, $subscriptionid, $biblionumber, 2 );
75
my $serialid3 = NewIssue( 3, $subscriptionid, $biblionumber, 2 );
76
77
is( GetPreviousSerialid( $subscriptionid ), $serialid2, "get previous serialid without parameter");
78
is( GetPreviousSerialid( $subscriptionid, 1 ), $serialid2, "get previous serialid with 1" );
79
is( GetPreviousSerialid( $subscriptionid, 2 ), $serialid1, "get previous serialid with 2" );
80
is( GetPreviousSerialid( $subscriptionid, 3 ), undef, "get previous serialid with 3, does not exist" );
81
72
$dbh->rollback;
82
$dbh->rollback;
73
- 

Return to bug 7677