Bugzilla – Attachment 102000 Details for
Bug 17703
Always export ISSN in serials claims issues CSV
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 17703: Add unit tests
Bug-17703-Add-unit-tests.patch (text/plain), 2.34 KB, created by
Fridolin Somers
on 2020-03-27 12:52:38 UTC
(
hide
)
Description:
Bug 17703: Add unit tests
Filename:
MIME Type:
Creator:
Fridolin Somers
Created:
2020-03-27 12:52:38 UTC
Size:
2.34 KB
patch
obsolete
>From 11ff3b8790f37b9eccfc73b80875547e443d382c Mon Sep 17 00:00:00 2001 >From: Fridolin Somers <fridolin.somers@biblibre.com> >Date: Fri, 27 Mar 2020 15:27:38 +0300 >Subject: [PATCH] Bug 17703: Add unit tests > >Run : prove t/db_dependent/Serials/Claims.t >--- > t/db_dependent/Serials/Claims.t | 11 ++++++++++- > 1 file changed, 10 insertions(+), 1 deletion(-) > >diff --git a/t/db_dependent/Serials/Claims.t b/t/db_dependent/Serials/Claims.t >index 6458497219..fabf437bf9 100644 >--- a/t/db_dependent/Serials/Claims.t >+++ b/t/db_dependent/Serials/Claims.t >@@ -1,8 +1,9 @@ > use Modern::Perl; >-use Test::More tests => 17; >+use Test::More tests => 20; > > use C4::Acquisition; > use C4::Budgets; >+use C4::Serials; > use Koha::Database; > use Koha::Acquisition::Booksellers; > use_ok('C4::Serials'); >@@ -122,6 +123,9 @@ my $subscriptionid_inlate3 = NewSubscription( > undef, undef, 0, undef, '2013-12-31', 0 > ); > >+my $bibissn = '123456789'; >+my $biblioitem = Koha::Biblioitems->find({ 'biblionumber' => $biblionumber }); >+$biblioitem->set({ issn => $bibissn })->store; > > $supplierlist = GetSuppliersWithLateIssues(); > is ( scalar(@$supplierlist), 2, '2 suppliers should have issues in late'); >@@ -130,6 +134,7 @@ is( GetLateOrMissingIssues(), undef, 'GetLateOrMissingIssues should return undef > > my @late_or_missing_issues = GetLateOrMissingIssues( $supplier_id1 ); > is( scalar(@late_or_missing_issues), 1, 'supplier 1 should have 1 issue in late' ); >+is( $late_or_missing_issues[0]->{issn}, $bibissn, 'return of GetLateOrMissingIssues() contains biblioitems.issn'); > > @late_or_missing_issues = GetLateOrMissingIssues( $supplier_id2); > is( scalar(@late_or_missing_issues), 2, 'supplier 2 should have 2 issues in late' ); >@@ -162,3 +167,7 @@ is( $serial_claimed->{claims_count}, 1, 'The serial should have been claimed' ); > my $today = output_pref({ dt => dt_from_string, dateformat => 'iso', dateonly => 1 }); > # FIXME: This test should pass. The GetLateOrMissingIssues should not deal with date format! > #is( $serial_claimed->{claimdate}, $today, 'The serial should have been claimed today' ); >+ >+@late_or_missing_issues = GetLateOrMissingIssues( undef, $subscriptionid_inlate1 ); >+is( scalar(@late_or_missing_issues), 1, 'subscription 1 should have 1 issue in late' ); >+is( $late_or_missing_issues[0]->{issn}, $bibissn, 'return of GetLateOrMissingIssues() contains biblioitems.issn'); >-- >2.25.1
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 17703
:
57832
|
65454
|
65455
|
66150
|
101994
|
101996
|
101997
|
102000
|
102001
|
102197
|
102199
|
119444
|
119445
|
119446