Bugzilla – Attachment 90969 Details for
Bug 23126
Multiline entries in subscription history display with <br/> in OPAC
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 23126: Add tests
Bug-23126-Add-tests.patch (text/plain), 2.75 KB, created by
Jonathan Druart
on 2019-06-24 17:57:41 UTC
(
hide
)
Description:
Bug 23126: Add tests
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2019-06-24 17:57:41 UTC
Size:
2.75 KB
patch
obsolete
>From 92081169adfa0442cbfa043641fbbdd979db6ebf Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Mon, 24 Jun 2019 12:39:15 -0500 >Subject: [PATCH] Bug 23126: Add tests > >Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >--- > t/db_dependent/Serials.t | 27 ++++++++++++++++++++++++--- > 1 file changed, 24 insertions(+), 3 deletions(-) > >diff --git a/t/db_dependent/Serials.t b/t/db_dependent/Serials.t >index 688749fb7a..c2d148e52b 100755 >--- a/t/db_dependent/Serials.t >+++ b/t/db_dependent/Serials.t >@@ -75,13 +75,13 @@ my $pattern_id = AddSubscriptionNumberpattern({ > whenmorethan1 => 1, > }); > >-my $notes = 'notes'; >+my $notes = "a\nnote\non\nseveral\nlines"; > my $internalnotes = 'intnotes'; > my $subscriptionid = NewSubscription( > undef, "", undef, undef, $budget_id, $biblionumber, > '2013-01-01', $frequency_id, undef, undef, undef, > undef, undef, undef, undef, undef, undef, >- 1, $notes,undef, '2013-01-01', undef, $pattern_id, >+ 1, $notes, ,undef, '2013-01-01', undef, $pattern_id, > undef, undef, 0, $internalnotes, 0, > undef, undef, 0, undef, '2013-12-31', 0 > ); >@@ -193,7 +193,28 @@ if ($old_frequency) { > is(C4::Serials::AddItem2Serial(), undef, 'test adding item to serial'); > is(C4::Serials::GetFullSubscription(), undef, 'test getting full subscription'); > is(C4::Serials::PrepareSerialsData(), undef, 'test preparing serial data'); >-is(C4::Serials::GetSubscriptionsFromBiblionumber(), undef, 'test getting subscriptions form biblio number'); >+ >+subtest 'GetSubscriptionsFromBiblionumber' => sub { >+ plan tests => 4; >+ >+ is( C4::Serials::GetSubscriptionsFromBiblionumber(), >+ undef, 'test getting subscriptions form biblio number' ); >+ >+ my $subscriptions = C4::Serials::GetSubscriptionsFromBiblionumber($biblionumber); >+ ModSubscriptionHistory( $subscriptions->[0]->{subscriptionid}, >+ undef, undef, $notes, $notes, $notes ); >+ >+ $subscriptions = C4::Serials::GetSubscriptionsFromBiblionumber($biblionumber); >+ is( $subscriptions->[0]->{opacnote}, $notes, >+ 'GetSubscriptionsFromBiblionumber should have returned the opacnote as it is in DB, ie. without br tags' >+ ); >+ is( $subscriptions->[0]->{recievedlist}, $notes, >+ 'GetSubscriptionsFromBiblionumber should have returned recievedlist as it is in DB, ie. without br tags' >+ ); >+ is( $subscriptions->[0]->{missinglist}, $notes, >+ 'GetSubscriptionsFromBiblionumber should have returned missinglist as it is in DB, ie. without br tags' >+ ); >+}; > > is(C4::Serials::GetSerials(), undef, 'test getting serials when you enter nothing'); > is(C4::Serials::GetSerials2(), undef, 'test getting serials when you enter nothing'); >-- >2.11.0
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 23126
:
90714
|
90869
|
90886
|
90887
|
90929
|
90931
|
90932
|
90967
|
90968
| 90969