Bugzilla – Attachment 117697 Details for
Bug 27842
Incorrect biblionumber handling in serials subscriptions
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 27842: Add tests
Bug-27842-Add-tests.patch (text/plain), 2.29 KB, created by
Kyle M Hall (khall)
on 2021-03-04 12:12:08 UTC
(
hide
)
Description:
Bug 27842: Add tests
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2021-03-04 12:12:08 UTC
Size:
2.29 KB
patch
obsolete
>From d1838e6324d1754fa8ada1444eb6a90d193a4363 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Wed, 3 Mar 2021 12:21:20 +0100 >Subject: [PATCH] Bug 27842: Add tests > >Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> >--- > t/db_dependent/Serials.t | 25 +++++++++++++++++++++++-- > 1 file changed, 23 insertions(+), 2 deletions(-) > >diff --git a/t/db_dependent/Serials.t b/t/db_dependent/Serials.t >index ac6c0d1df3..981765dad7 100755 >--- a/t/db_dependent/Serials.t >+++ b/t/db_dependent/Serials.t >@@ -419,8 +419,8 @@ subtest "PreserveSerialNotes preference" => sub { > > }; > >-subtest "NewSubscription" => sub { >- plan tests => 1; >+subtest "NewSubscription|ModSubscription" => sub { >+ plan tests => 4; > my $subscriptionid = NewSubscription( > "", "", "", "", $budget_id, $biblionumber, > '2013-01-01', $frequency_id, "", "", "", >@@ -430,4 +430,25 @@ subtest "NewSubscription" => sub { > "", "", 0, "", '2013-12-31', 0 > ); > ok($subscriptionid, "Sending empty string instead of undef to reflect use of the interface"); >+ >+ my $subscription = Koha::Subscriptions->find($subscriptionid); >+ my $serials = Koha::Serials->search({ subscriptionid => $subscriptionid }); >+ is( $serials->count, 1, "NewSubscription created a first serial" ); >+ >+ my $biblio_2 = $builder->build_sample_biblio; >+ my $subscription_info = $subscription->unblessed; >+ $subscription_info->{biblionumber} = $biblio_2->biblionumber; >+ ModSubscription( @$subscription_info{qw( >+ librarian branchcode aqbooksellerid cost aqbudgetid startdate >+ periodicity firstacquidate irregularity numberpattern locale >+ numberlength weeklength monthlength lastvalue1 innerloop1 lastvalue2 >+ innerloop2 lastvalue3 innerloop3 status biblionumber callnumber notes >+ letter manualhistory internalnotes serialsadditems staffdisplaycount >+ opacdisplaycount graceperiod location enddate subscriptionid >+ skip_serialseq >+ )} ); >+ >+ $serials = Koha::Serials->search({ subscriptionid => $subscriptionid }); >+ is( $serials->count, 1, "Still only one serial" ); >+ is( $serials->next->biblionumber, $biblio_2->biblionumber, 'ModSubscription should have updated serial.biblionumber'); > }; >-- >2.24.1 (Apple Git-126)
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 27842
:
117565
|
117566
|
117567
|
117677
|
117696
|
117697
|
117698
|
117712
|
120239
|
120240
|
120241