Bugzilla – Attachment 12205 Details for
Bug 8768
t/ItemType.t fails because DBD::Mock has no empty result set
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
bug 8768 correct an error in ItemType.t
bug-8768-correct-an-error-in-ItemTypet.patch (text/plain), 1.21 KB, created by
Chris Cormack
on 2012-09-14 02:33:00 UTC
(
hide
)
Description:
bug 8768 correct an error in ItemType.t
Filename:
MIME Type:
Creator:
Chris Cormack
Created:
2012-09-14 02:33:00 UTC
Size:
1.21 KB
patch
obsolete
>From 3e3199c0d2f78d240ee7905358e1c25cd57d156b Mon Sep 17 00:00:00 2001 >From: Colin Campbell <colin.campbell@ptfs-europe.com> >Date: Thu, 13 Sep 2012 10:37:56 +0100 >Subject: [PATCH] bug 8768 correct an error in ItemType.t > >The second test in ItemType.t tests that an empty table >returns no rows however as Mock::DBD has no resultset >it fails with an error in DBI It requires that an >empty resultset is defined in Mock::DBD first >This patch adds that mocked empty table > >Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz> >--- > t/ItemType.t | 9 ++++++++- > 1 file changed, 8 insertions(+), 1 deletion(-) > >diff --git a/t/ItemType.t b/t/ItemType.t >index 476ca19..87e090e 100755 >--- a/t/ItemType.t >+++ b/t/ItemType.t >@@ -1,6 +1,5 @@ > #!/usr/bin/perl > # >-# This Koha test module is a stub! > # Add more tests here!!! > > use strict; >@@ -33,7 +32,15 @@ my $itemtypes = [ > [ 'CD', 'CDRom', 0, 0, '', '' ] > ]; > >+my $itemtypes_empty = [ >+ [ >+ 'itemtype', 'description', 'rentalcharge', 'notforloan', >+ 'imageurl', 'summary' >+ ], >+]; >+ > my $dbh = C4::Context->dbh(); >+$dbh->{mock_add_resultset} = $itemtypes_empty; > > my @itemtypes = C4::ItemType->all(); > is( @itemtypes, 0, 'Testing all itemtypes is empty' ); >-- >1.7.9.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 8768
:
12185
| 12205