Bugzilla – Attachment 20538 Details for
Bug 7677
Subscriptions: Ability to define default itemtype and automatically change itemtype of older issues on receive of next issue
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 7677: UT: add unit tests for GetPreviousSerialid
Bug-7677-UT-add-unit-tests-for-GetPreviousSerialid.patch (text/plain), 1.55 KB, created by
Jonathan Druart
on 2013-08-21 12:41:00 UTC
(
hide
)
Description:
Bug 7677: UT: add unit tests for GetPreviousSerialid
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2013-08-21 12:41:00 UTC
Size:
1.55 KB
patch
obsolete
>From 25523663bff85c27189fd4e31aa20f2f48600c27 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@biblibre.com> >Date: Wed, 21 Aug 2013 14:38:34 +0200 >Subject: [PATCH] Bug 7677: UT: add unit tests for GetPreviousSerialid > >--- > t/db_dependent/Serials_2.t | 12 +++++++++++- > 1 file changed, 11 insertions(+), 1 deletion(-) > >diff --git a/t/db_dependent/Serials_2.t b/t/db_dependent/Serials_2.t >index 72d71d9..0f93472 100644 >--- a/t/db_dependent/Serials_2.t >+++ b/t/db_dependent/Serials_2.t >@@ -1,7 +1,7 @@ > #!/usr/bin/perl > use Modern::Perl; > >-use Test::More tests => 4; >+use Test::More tests => 8; > > use MARC::Record; > use C4::Biblio qw( AddBiblio ); >@@ -69,4 +69,14 @@ my $subscription = GetSubscription( $subscriptionid ); > is( C4::Serials::can_edit_subscription($subscription), 1, "User can edit a subscription with an empty branchcode"); > #TODO add UT when C4::Auth->set_permissions (or setuserflags) will exist. > >+# GetPreviousSerialid >+my $serialid1 = NewIssue( 1, $subscriptionid, $biblionumber, 2 ); >+my $serialid2 = NewIssue( 2, $subscriptionid, $biblionumber, 2 ); >+my $serialid3 = NewIssue( 3, $subscriptionid, $biblionumber, 2 ); >+ >+is( GetPreviousSerialid( $subscriptionid ), $serialid2, "get previous serialid without parameter"); >+is( GetPreviousSerialid( $subscriptionid, 1 ), $serialid2, "get previous serialid with 1" ); >+is( GetPreviousSerialid( $subscriptionid, 2 ), $serialid1, "get previous serialid with 2" ); >+is( GetPreviousSerialid( $subscriptionid, 3 ), undef, "get previous serialid with 3, does not exist" ); >+ > $dbh->rollback; >-- >1.7.10.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 7677
:
16339
|
16425
|
16456
|
20537
|
20538
|
24099
|
24635
|
25980
|
25981
|
25983
|
27774
|
28950
|
28951
|
28952
|
28953
|
29570
|
29571
|
29572
|
34220
|
34221
|
34222
|
34223
|
34665
|
36389
|
36446
|
36448
|
36449
|
36450
|
36451
|
36452
|
36453
|
36679
|
36680
|
36681
|
36682
|
36683
|
42923
|
42924
|
45938
|
45939
|
45940
|
45941
|
45942
|
45943
|
46216
|
47475
|
52010
|
54876
|
55000
|
55323
|
55466
|
55467
|
55468
|
55469
|
55470
|
55471
|
55472
|
55473
|
55474
|
55475