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

M. Tompsett <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #33448|0                           |1
        is obsolete|                            |

--- Comment #3 from M. Tompsett <[email protected]> ---
Created attachment 33449
  -->
http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=33449&action=edit
Bug 13230: t/Biblio.t should run without a DB

This patch makes t/Biblio.t mock the DB connexion setting
a void one. All tests in this file currently call the C4::Biblio
functions with invalid (absent) parameters, so they are expected to
raise warnings and return undef values.

If someone writes mocked tests for the rest of the functionality,
it is expected to mock the DB calls to match the desired scenario.

To test:
- Turn of MySQL
- Run
  $ prove t/Biblio.t
=> FAIL: Tests fail because of missing MySQL server
- Apply the patch
- Run
  $ prove t/Biblio.t
=> SUCCESS: Tests now pass
- Start MySQL
- Run
  $ prove t/Biblio.t
=> SUCCESS: Tests still pass
- Sign off

Regards
Tomas

Sponsored-by: The will to procrastinate
Signed-off-by: Robin Sheat <[email protected]>
Sponsored-by: Wanting the darn packages to build
Signed-off-by: Mark Tompsett <[email protected]>

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[email protected]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to