Bugzilla – Attachment 39693 Details for
Bug 14117
Silence warnings t/Search_PazPar2.t
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[PASSED QA] Bug 14117: Silence warnings t/SearchPazPar2.t
PASSED-QA-Bug-14117-Silence-warnings-tSearchPazPar.patch (text/plain), 3.07 KB, created by
Kyle M Hall (khall)
on 2015-05-29 15:37:12 UTC
(
hide
)
Description:
[PASSED QA] Bug 14117: Silence warnings t/SearchPazPar2.t
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2015-05-29 15:37:12 UTC
Size:
3.07 KB
patch
obsolete
>From b08406cce25a72a1f487f1c3153016754c61e050 Mon Sep 17 00:00:00 2001 >From: Mark Tompsett <mtompset@hotmail.com> >Date: Fri, 1 May 2015 21:36:23 -0400 >Subject: [PATCH] [PASSED QA] Bug 14117: Silence warnings t/SearchPazPar2.t > >The use of relative URLS (null actually), triggers warnings. >Catch them, instead of letting them loose. > >TEST PLAN >--------- >1) $ prove t/Search_PazPar2.t > -- noise for each test currently. >2) apply patch >3) $ prove t/Search_PazPar2.t > -- No noise, and extra tests added. > -v shows caught warning tests. >4) koha qa test tools. > >Signed-off-by: Indranil Das Gupta <indradg@gmail.com> > >Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> >--- > t/Search_PazPar2.t | 43 ++++++++++++++++++++++++++++++++++--------- > 1 files changed, 34 insertions(+), 9 deletions(-) > >diff --git a/t/Search_PazPar2.t b/t/Search_PazPar2.t >index 5af0ac4..62b622d 100755 >--- a/t/Search_PazPar2.t >+++ b/t/Search_PazPar2.t >@@ -3,10 +3,10 @@ > # This Koha test module is a stub! > # Add more tests here!!! > >-use strict; >-use warnings; >+use Modern::Perl; > >-use Test::More tests => 8; >+use Test::More tests => 14; >+use Test::Warn; > > BEGIN { > use_ok('C4::Search::PazPar2'); >@@ -14,9 +14,34 @@ BEGIN { > > my $obj = C4::Search::PazPar2->new(); > ok ($obj, "testing new works"); >-is ($obj->init(), "1", "testing init returns '1' when given no arguments"); >-is ($obj->search(), "1", "testing search returns '1' when given no arguments"); >-is ($obj->stat(), undef, "testing stat returns undef when given no arguments"); >-is ($obj->show(), undef, "testing show returns undef when given no arguments"); >-is ($obj->record(), undef, "testing record returns undef when given no arguments"); >-is ($obj->termlist(), undef, "testing termlist returns undef when given no arguments"); >+ >+my $result; >+warning_like { $result = $obj->init(); } >+ qr/400 URL must be absolute at .*C4\/Search\/PazPar2.pm/, >+ "Expected relative URL warning"; >+is ($result, "1", "testing init returns '1' when given no arguments"); >+ >+warning_like { $result = $obj->search(); } >+ qr/400 URL must be absolute at .*C4\/Search\/PazPar2.pm/, >+ "Expected relative URL warning"; >+is ($result, "1", "testing search returns '1' when given no arguments"); >+ >+warning_like { $result = $obj->stat(); } >+ qr/400 URL must be absolute at .*C4\/Search\/PazPar2.pm/, >+ "Expected relative URL warning"; >+is ($result, undef, "testing stat returns undef when given no arguments"); >+ >+warning_like { $result = $obj->show(); } >+ qr/400 URL must be absolute at .*C4\/Search\/PazPar2.pm/, >+ "Expected relative URL warning"; >+is ($result, undef, "testing show returns undef when given no arguments"); >+ >+warning_like { $result = $obj->record(); } >+ qr/400 URL must be absolute at .*C4\/Search\/PazPar2.pm/, >+ "Expected relative URL warning"; >+is ($result, undef, "testing record returns undef when given no arguments"); >+ >+warning_like { $result = $obj->termlist(); } >+ qr/400 URL must be absolute at .*C4\/Search\/PazPar2.pm/, >+ "Expected relative URL warning"; >+is ($result, undef, "testing termlist returns undef when given no arguments"); >-- >1.7.2.5
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 14117
:
38758
|
39016
| 39693