Commit graph

11 commits

Author SHA1 Message Date
Galen Charlton
49ebd60687 Bug 12288: add regression test
To test:

[1] Run prove -v t/Koha.t.  The last test should fail.
[2] Apply the main patch for this bug.
[3] Run prove -v t/Koha.t again.  This time, all tests should pass.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-05-19 19:59:40 +00:00
Galen Charlton
59c569ce92 Bug 12243: add regression test
This patch adds a regression test for C4::Koha::NormalizeISBN
throwing an exception when trying to parse an invalid ISBN.

To test:

[1] Run prove -v t/Koha.t.  The last test should fail.
[2] Apply the main patch for this bug.
[3] Run prove -v t/Koha.t again.  This time, the test
    should pass.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-05-19 15:42:56 +00:00
ed4b60fa1d Bug 10500: Improve ISBN matching when importing records
Test Plan:
1) Catalog a record with the ISBN "0394502884 (Random House)"
2) Export the record, edit it so the ISBN is now
   "0394502884 (UnRandomHouse)"
3) Using the record import tool, import this record with matching
   on ISBN.
4) You should not find a match
5) Apply this patch
6) Run updatedatabase.pl
7) Enable the new system preference AggressiveMatchOnISBN
8) Repeat step 3
9) The tool should now find a match

Signed-off-by: Tom McMurdo <thomas.mcmurdo@state.vp.us>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-05-05 18:04:55 +00:00
6110375307 Bug 9659 - QA Follow up: Unit tests
Added some tests against the methods added by this patch.

To test, prove -v
- t/Koha.t
- t/ReportsGuided.t

Edit: fixed the amount of tests in the skip block. Tests fail for people having earlier versions of DBD::Mock.

Sponsored-by: Universidad Nacional de Córdoba
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works quite nicely!
All tests and QA script pass.
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
2013-04-26 08:07:24 -04:00
claudia
81f9c4976c Bug 5327 removing uneeded tests
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-01-18 09:10:26 +13:00
Zach Sim
53a301b8f2 Bug 5327 - Adding UNIT Tests.
Squashed commit of the following:

commit 146d14665c52edaa85e38b70aabc9d52be5d64b6
Author: Zach Sim <joseph.zachariah.sim@gmail.com>
Date:   Mon Jan 17 16:07:24 2011 +1300

    Edited DisplayISBN to cleanup the ISBN using _isbn_cleanup if it is not 13 or 10 digits long.

commit ba97b26d9a25470b0717cdd60a3d4f7a5c459ca9
Author: Zach Sim <joseph.zachariah.sim@gmail.com>
Date:   Mon Jan 17 16:06:14 2011 +1300

    Added extra unit tests to test C4::Koha::DisplayISBN.

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-01-17 16:25:08 +13:00
Colin Campbell
51eb4fa12e Bug 4305: Add test case for ISBN-13 to ISBN-10 conversion
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2010-11-13 06:43:49 +13:00
bcedff69bc bug 4305: add a couple test cases for _isbn_cleanup
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
Signed-off-by: Chris Nighswonger <cnighswonger@foundations.edu>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2010-11-12 10:26:57 +13:00
f88f88dcc5 bug 5301: improve escaping of XML characters in bib output
<, >, ', or " in an item call number will no longer make
the bib displays break when using XSLT mode.

Added a new routine to C4::Koha, xml_escape(), to implement
converting &, <, >, ', and " to their corresponding
entities.

Patch loosely based on work done by Daniel Latrémolière <daniel.latremoliere@bulac.fr>

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2010-11-02 08:31:47 +13:00
93b882cdde use Test::More for t/Koha.t
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-10-06 09:15:36 -04:00
Joe Atzberger
a1fe32d2f8 Total Test Overhaul! Most of these were stubs, and still are.
Input.t was replaced because it tested a now obsolete function.
Input.pm has that function commented out.
Several files were renamed to match their counterparts or
correct misspellingz.

Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2007-10-18 16:26:44 -05:00
Renamed from t/koha.t (Browse further)