Summary: | t/ItemType.t fails because DBD::Mock has no empty result set | ||
---|---|---|---|
Product: | Koha | Reporter: | Colin Campbell <colin.campbell> |
Component: | Test Suite | Assignee: | Colin Campbell <colin.campbell> |
Status: | CLOSED FIXED | QA Contact: | Jonathan Druart <jonathan.druart> |
Severity: | enhancement | ||
Priority: | P5 - low | CC: | chris, jonathan.druart, paul.poulain |
Version: | 3.10 | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | --- |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: | ||
Circulation function: | |||
Attachments: |
Proposed patch
bug 8768 correct an error in ItemType.t |
Description
Colin Campbell
2012-09-13 09:37:09 UTC
Created attachment 12185 [details] [review] Proposed patch 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) Result: PASS 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 <chrisc@catalyst.net.nz> QA Comments: The patch fixes a failed test. Marked as Passed QA. Patch pushed to master |