Bugzilla – Attachment 37368 Details for
Bug 13928
Noisy t/Borrower tests
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 13928: Clean up noisy t/Borrower.t tests
Bug-13928-Clean-up-noisy-tBorrowert-tests.patch (text/plain), 2.12 KB, created by
Mark Tompsett
on 2015-03-30 13:12:07 UTC
(
hide
)
Description:
Bug 13928: Clean up noisy t/Borrower.t tests
Filename:
MIME Type:
Creator:
Mark Tompsett
Created:
2015-03-30 13:12:07 UTC
Size:
2.12 KB
patch
obsolete
>From 3f957403505b6570ccb2cde7ceea00a2c57e2694 Mon Sep 17 00:00:00 2001 >From: Mark Tompsett <mtompset@hotmail.com> >Date: Mon, 30 Mar 2015 09:04:41 -0400 >Subject: [PATCH] Bug 13928: Clean up noisy t/Borrower.t tests > >While testing bug 13882, noisy messages were noticed. Also, >Test::Warn was used, but no catching attempts were made. This >patch solves that problem. > >TEST PLAN >--------- >1) prove -v t/Borrowers.t > -- There should be three noisy lines. >2) apply patch >3) prove -v t/Borrowers.t > -- There will be 3 more tests and no noisy lines. >4) Run koha qa test tool > -- There should be no issues. > >NOTE: This will conflict with bug 13882 if either gets pushed > to master, but fixing the conflict should be easy enough. >--- > t/Borrower.t | 10 ++++++---- > 1 file changed, 6 insertions(+), 4 deletions(-) > >diff --git a/t/Borrower.t b/t/Borrower.t >index 8da4d88..2118d59 100755 >--- a/t/Borrower.t >+++ b/t/Borrower.t >@@ -17,7 +17,7 @@ > > use Modern::Perl; > >-use Test::More tests => 13; >+use Test::More tests => 16; > use Test::Warn; > > use Koha::Database; >@@ -46,11 +46,13 @@ ok( ref($ret) eq 'Koha::Borrower', "Set returns object on success" ); > is( $object2->surname(), "Test Borrower Surname 3", "Set sets first field correctly" ); > is( $object2->firstname(), "Test Firstname", "Set sets second field correctly" ); > >-$ret = $object->set({ surname => "Test Borrower Surname 4", bork => "bork" }); >+warning_is { $ret = $object->set({ surname => "Test Borrower Surname 4", bork => "bork" }) } "No property bork!", "Expected 'No property bork!' caught"; > is( $object2->surname(), "Test Borrower Surname 3", "Bad Set does not set field" ); > is( $ret, 0, "Set returns 0 when passed a bad property" ); > >-ok( ! defined $object->bork(), 'Bad getter returns undef' ); >-ok( ! defined $object->bork('bork'), 'Bad setter returns undef' ); >+warning_is { $ret = $object->bork() } 'No method bork!', "Expected 'No method bork!' caught for getter."; >+ok( ! defined $ret, 'Bad getter returns undef' ); >+warning_is { $ret = $object->bork('bork') } 'No method bork!', "Expected 'No method bork!' caught for setter."; >+ok( ! defined $ret, 'Bad setter returns undef' ); > > 1; >-- >1.9.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 13928
:
37367
|
37368
|
37397
|
37398
|
37565
|
37586