[Koha-bugs] [Bug 14346] t/Biblio.t fails because of new warning

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Sat Jun 6 19:14:56 CEST 2015


http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14346

Katrin Fischer <katrin.fischer at bsz-bw.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #39928|0                           |1
        is obsolete|                            |
  Attachment #39929|0                           |1
        is obsolete|                            |

--- Comment #6 from Katrin Fischer <katrin.fischer at bsz-bw.de> ---
Created attachment 39944
  -->
http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=39944&action=edit
[PASSED QA] Bug 14346: t/Biblio.t fails because of new warning

Running

 $ prove t/Biblio.t

fails because of us now using DBIx to retrieve sysprefs. Then our mocked DBI is
not "supported" by DBIx hence a warning that makes our test fail (there is one
more warning now).

The cool thing about this, is that it actually helped spot a situation where
GetMarcBiblio is doing wrong things because is not checking its parameters are
undefined, so we have the chance to fix it.

This patch makes GetMarcBiblio return undef if no biblionumber is passed, and
also raises a conveniently carped warning. This change is tested in t/Biblio.t
with new tests.

To test:
- In current master, run
  $ prove t/Biblio.t
=> FAIL: a test detects a wrong warning count and fails.
- Apply the patch and run
  $ prove t/Biblio.t
=> SUCCESS: Tests now pass, and there are 2 new ones.
- Sign off :-D

Regards

Signed-off-by: Mark Tompsett <mtompset at hotmail.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83 at web.de>

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list