Bugzilla – Attachment 51874 Details for
Bug 16609
Catch warning from Koha::Hold in Hold.t
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 16609: Catch warning from Koha::Hold in Hold.t
Bug-16609-Catch-warning-from-KohaHold-in-Holdt.patch (text/plain), 1.30 KB, created by
Marcel de Rooy
on 2016-05-27 12:08:47 UTC
(
hide
)
Description:
Bug 16609: Catch warning from Koha::Hold in Hold.t
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2016-05-27 12:08:47 UTC
Size:
1.30 KB
patch
obsolete
>From 1ca3a6c1d5d4d34a6cd53ed5c63da4d9dfe1d756 Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Fri, 27 May 2016 14:02:42 +0200 >Subject: [PATCH] Bug 16609: Catch warning from Koha::Hold in Hold.t >Content-Type: text/plain; charset=utf-8 > >Before this patch, the suspend step triggers a warn from Koha::Hold. >Now we catch it. > >Test plan: >Run the test. Do not see the warning about unable to suspend. > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > t/db_dependent/Hold.t | 6 ++++-- > 1 file changed, 4 insertions(+), 2 deletions(-) > >diff --git a/t/db_dependent/Hold.t b/t/db_dependent/Hold.t >index 204d60e..9604bd8 100755 >--- a/t/db_dependent/Hold.t >+++ b/t/db_dependent/Hold.t >@@ -27,7 +27,8 @@ use Koha::Item; > use Koha::DateUtils; > use t::lib::TestBuilder; > >-use Test::More tests => 31; >+use Test::More tests => 32; >+use Test::Warn; > > use_ok('Koha::Hold'); > >@@ -86,7 +87,8 @@ $hold->resume(); > is( $hold->suspend, 0, "Hold is not suspended" ); > is( $hold->suspend_until, undef, "Hold no longer has suspend_until date" ); > $hold->found('W'); >-$hold->suspend_hold(); >+warning_like { $hold->suspend_hold } >+ qr/Unable to suspend waiting hold!/, 'Catch warn about failed suspend'; > is( $hold->suspend, 0, "Waiting hold cannot be suspended" ); > > $item = $hold->item(); >-- >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 16609
:
51874
|
51926
|
52117