Bugzilla – Attachment 53186 Details for
Bug 16860
Catch warning t/db_dependent/ClassSource.t
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 16860: Catch warning t/db_dependent/ClassSource.t
Bug-16860-Catch-warning-tdbdependentClassSourcet.patch (text/plain), 2.05 KB, created by
Jonathan Druart
on 2016-07-07 15:53:01 UTC
(
hide
)
Description:
Bug 16860: Catch warning t/db_dependent/ClassSource.t
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2016-07-07 15:53:01 UTC
Size:
2.05 KB
patch
obsolete
>From 6d3f75e4d416ec55c2e1b27d613e62312b0e180c Mon Sep 17 00:00:00 2001 >From: Mark Tompsett <mtompset@hotmail.com> >Date: Wed, 6 Jul 2016 11:51:40 -0400 >Subject: [PATCH] Bug 16860: Catch warning t/db_dependent/ClassSource.t > >$ prove t/db_dependent/ClassSource.t >t/db_dependent/ClassSource.t .. 3/24 attempting to use non-existent class sorting routine routine1 >t/db_dependent/ClassSource.t .. ok >All tests successful. >Files=1, Tests=24, 1 wallclock secs ( 0.02 usr 0.00 sys + 0.66 cusr 0.02 csys = 0.70 CPU) >Result: PASS > >The above warning might be scary to those unfamiliar with the test. >Add a test to catch the warning. > >TEST PLAN >--------- >1) prove t/db_dependent/ClassSource.t > -- as above >2) apply patch >3) prove t/db_dependent/ClassSource.t > -- no message >4) prove -v t/db_dependent/ClassSource.t > -- test 13 is the new test >5) run koha qa test tools > >Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com> >Workas as advertised > >Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >--- > t/db_dependent/ClassSource.t | 11 ++++++++--- > 1 file changed, 8 insertions(+), 3 deletions(-) > >diff --git a/t/db_dependent/ClassSource.t b/t/db_dependent/ClassSource.t >index 5e8a0ec..99beb3d 100644 >--- a/t/db_dependent/ClassSource.t >+++ b/t/db_dependent/ClassSource.t >@@ -2,7 +2,8 @@ > > use Modern::Perl; > >-use Test::More tests => 24; >+use Test::More tests => 25; >+use Test::Warn; > > use C4::Context; > >@@ -126,8 +127,12 @@ is_deeply( > ); > > #Test GetClassSort >-my $getclassSort = GetClassSort( 'source1', 'sortrule1', 'item1' ) >- ; #Note: Create a warning:" attempting to use non-existent class sorting routine $sort_routine" >+my $getclassSort; >+#Note: Create a warning:" attempting to use non-existent class sorting routine $sort_routine" >+warning_like >+ { $getclassSort = GetClassSort( 'source1', 'sortrule1', 'item1' ) } >+ qr/attempting to use non-existent class sorting routine/, >+ 'Non-existent class warning caught'; > is( $getclassSort, "SORTRULE1_ITEM1", > " the sort key corresponding to Source1 and sortrule1 and item1 is SORTRULE1_ITEM1" > ); >-- >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 16860
:
53141
|
53167
| 53186 |
53187