Bugzilla – Attachment 52117 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.40 KB, created by
Jonathan Druart
on 2016-06-07 09:54:01 UTC
(
hide
)
Description:
Bug 16609: Catch warning from Koha::Hold in Hold.t
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2016-06-07 09:54:01 UTC
Size:
1.40 KB
patch
obsolete
>From 816943f41209b6b2328f032a527b2ba977d68795 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 > >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> > >NOTE: Nice clean up! > >Signed-off-by: Mark Tompsett <mtompset@hotmail.com> > >Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >--- > 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(); >-- >2.8.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 16609
:
51874
|
51926
| 52117