ItemType.t fails because the second test attempts to retrieve a non existent result set causing an error in DBI
The intention of the test is that all returns 0 on an empty table so DBD::Mock should be populated with an empty result set otherwise the test suite fails
Created attachment 12185 [details] [review]
To test with this patch prove t/ItemType.t should run all tests and test two should return ok, running prove -v t/ItemType.t should show 'test 2 - Testing all itemtypes is empty' to have passed
Hmm I dont see the fail before the patch
prove t/ItemType.t 2012-09-14 14:28:40 chrisc pts/1
t/ItemType.t .. ok
All tests successful.
Files=1, Tests=15, 1 wallclock secs ( 0.05 usr 0.01 sys + 0.12 cusr 0.03 csys = 0.21 CPU)
And still all 15 pass afterwards.
But it is more correct to declare an empty set, so will sign off. (Note this was passing fine on jenkins too)
Created attachment 12205 [details] [review]
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 <firstname.lastname@example.org>
The patch fixes a failed test. Marked as Passed QA.
Patch pushed to master