Commit Graph

256 Commits

Author SHA1 Message Date
Robin Sheat da11b6d986 Bug 5477 [SIGN-OFF] Fix test cases that require database access
This moves the DB-requiring tests out of the way, with the exception of
00-load.t which is used by the git hooks. For it, it makes it skip
loading problematic modules. This allows 'make test' to complete successfully
without a database configured, wich is a required part of making packages.

This has been tested against the v3.02.03 tag and the master branch.

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
(cherry picked from commit 9df2a4a8fc)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
2011-01-29 19:57:31 -05:00
Chris Cormack 649fd4952d Bug 5327 fixing missing number of tests
(cherry picked from commit d64008644a)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
2011-01-20 17:59:45 -05:00
Zach Sim ab3263e018 Added more unit tests to check when JSONStream should fail.
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
(cherry picked from commit 5f0f2e297a)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
2011-01-20 17:59:45 -05:00
Zach Sim 928165875c Bug 5327: Added unit tests to Output_JSONStream.t
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
(cherry picked from commit 434d9a3c66)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
2011-01-20 17:59:45 -05:00
Chris Cormack bc1620b3d6 Bug 5327: small typo in the Members.t test
(cherry picked from commit 1c89ce34b9)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
2011-01-20 17:59:44 -05:00
johnboy 6bf8c7ae67 Bug 5327 Made test file for Accounts.pm
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
(cherry picked from commit 669280c7ab)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
2011-01-20 17:59:44 -05:00
Chris Cormack e4540c647e Bug 5327: Shifting and little tidy up of the members tests
(cherry picked from commit 314772637c)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
2011-01-20 17:59:44 -05:00
johnboy a22b4f3046 Bug 5327 Some tests added
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
(cherry picked from commit d567945517)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
2011-01-20 17:59:44 -05:00
Chris Cormack f7a22b7a1b Bug 5327 - Now we are doing db calls, we need to shift this to t/db_dependent
(cherry picked from commit e03026adff)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
2011-01-20 17:59:44 -05:00
Zach Sim 60b5c614a7 Added unit tests to test all of get_amazon_tld in Amazon.pm.
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
(cherry picked from commit b56121db02)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
2011-01-20 17:59:43 -05:00
Chris Cormack c6d6955761 Bug 5327: Little change to Record.t
(cherry picked from commit 23f92a8f8d)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
2011-01-20 17:59:43 -05:00
johnboy 947e087b8b Bug 5327 1 more test added.
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
(cherry picked from commit 5aa8040875)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
2011-01-20 17:59:43 -05:00
Zach Sim 79094b6aec Added unit tests for Biblio and moved it to db_dependent as it requires the database.
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
(cherry picked from commit 65e2cda8d2)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
2011-01-20 17:59:43 -05:00
Chris Cormack 3e4abd89dd Bug 5327 Cleaning up XISBN.t a bit
(cherry picked from commit 4093615e9f)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
2011-01-20 17:59:42 -05:00
Chris Cormack fde778d557 Bug 5327 - Fixing a path issue with XISBN.t
(cherry picked from commit 71a7d2ad38)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
2011-01-20 17:59:42 -05:00
Chris Cormack 242012c25f Bug 5327 litte fix for Background tests
(cherry picked from commit c8ba99e155)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
2011-01-20 17:59:42 -05:00
Chris Cormack e5d71e9d59 Bug 5327 shifting database dependent modules and scripts to t/db_dependent
(cherry picked from commit eff21765f9)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
2011-01-20 17:49:29 -05:00
johnboy 657057775f bug 5327 updated test file
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
(cherry picked from commit cc039cdb0f)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
2011-01-20 17:49:29 -05:00
Zach Sim a2ef73e147 Added unit tests using a test database for XISBN.
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
(cherry picked from commit 52762c6c79)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
2011-01-20 17:49:29 -05:00
Zach Sim d41579f7af Created unit testing using the testdatabase for XISBN.
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
(cherry picked from commit f2d575c92c)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
2011-01-20 17:49:28 -05:00
Zach Sim ddb38021b7 Added extra unit tests to Debug.t
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
(cherry picked from commit 3b22fc6cc0)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
2011-01-17 18:34:39 -05:00
johnboy 8a4f5e7593 bug 5327 started testing
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
(cherry picked from commit 80f8c41e4c)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
2011-01-17 18:34:19 -05:00
johnboy 8a6e069416 Bug 5327 Starting tests for BackgroundJob
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
(cherry picked from commit 594a31bfe1)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
2011-01-17 18:30:16 -05:00
spartaness e6a16de55b Bug 5327 Starting Unit Tests for Auth.pm
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
(cherry picked from commit 3df717479c)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
2011-01-17 18:22:17 -05:00
claudia 2e1393486f Bug 5327 removing uneeded tests
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
(cherry picked from commit 81f9c4976c)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
2011-01-17 18:21:42 -05:00
Zach Sim 980d387847 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>
(cherry picked from commit 53a301b8f2)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
2011-01-17 17:52:36 -05:00
Colin Campbell 3a7c8426c0 Bug 5611 Tidy up C4::Scrubber
Remove the unneeded package variables
Remove unnecessary variables
Removed some cargo-cult programming
Tidied the indentation from mix of tabs & spaces
Add a Test that we actually return the required class
of object

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
(cherry picked from commit 073fb1aee6)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
2011-01-12 13:42:21 -05:00
Colin Campbell 8beda6cfca Bug 5601 :: Add tests for bugfix
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
(cherry picked from commit 0d5029ec5b)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
2011-01-12 13:42:20 -05:00
Colin Campbell c99ce7f3fd Bug 5448 Use Test::More in Boolean.t
Use Test::More's structure as more readable
Replaced a test of an used function with a use_ok test
of the module

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
(cherry picked from commit 78be08c73e)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
2010-12-01 16:54:52 -05:00
Galen Charlton 8dc027db12 bug 5400: new test case to find files with merge conflict markers
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
(cherry picked from commit 4cef5ec961)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
2010-11-13 18:10:51 -05:00
Galen Charlton af37b7d4e6 bug 5393 [SIGNED-OFF]: add test case to check well-formedness of XML/XSLT files
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
(cherry picked from commit 35d2008ef0)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
2010-11-12 21:14:35 -05:00
Colin Campbell 8912a613a5 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>
(cherry picked from commit 51eb4fa12e)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
2010-11-12 13:25:07 -05:00
Galen Charlton 57b3924b9a 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>
(cherry picked from commit bcedff69bc)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
2010-11-11 19:48:15 -05:00
Chris Cormack 77c39f6cfc Merge remote branch 'kc/new/bug_5386' into kcmaster
(cherry picked from commit af1d829031)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
2010-11-11 12:52:41 -05:00
Chris Cormack 3b4cf45f9b Test modules compile
Script to test modules compile, when used with a pre-commit hook this
can test before a commit

Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
(cherry picked from commit 7ecf2c2dc4)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
2010-11-11 12:52:36 -05:00
Chris Cormack 0fffa19267 Merge remote branch 'kc/new/bug_5105' into kcmaster
(cherry picked from commit 235cf872a5)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
2010-11-11 08:53:14 -05:00
Chris Cormack e74fc14914 Bug 5363 - Removing unused module (C4::Cache::FastMemcached)
Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
2010-11-04 19:17:19 -04:00
Galen Charlton d6edcfa85e 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>
Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
2010-11-02 20:18:26 -04:00
Galen Charlton 7b251b91f1 bug 5327: follow-up to fix SIP tests
* removed t/SIP_SIPServer.t - despite the file name,
  C4/SIP/SIPserver.pm is not actually a module and
  cannot be 'used' or 'required'
* set module search path so that t/SIP_ILS.t and
  t/SIP_Sip.t will pass

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
2010-11-01 15:03:45 -04:00
Katrin Fischer 2d2e61bdb4 Bug 5327: More basic unit tests for C4 modules
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
2010-11-01 15:03:11 -04:00
Nate Curulla 5c8bbba02b Bug 5327: Add unit test for ItemType.pm
Signed-off-by: Ian Walls <ian.walls@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
2010-10-31 21:09:02 -04:00
Daniel Grobani 37981b0341 unit test stub for Z3950.pm
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
2010-10-30 22:37:14 -04:00
Brian Engard 0ba23be34d Create Unit Test for ImportBatch
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
2010-10-30 22:37:01 -04:00
Magnus Enger a04061d5a9 Bug 5327: Add basic unit tests to some C4 modules
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
2010-10-30 22:32:46 -04:00
Katrin Fischer 3fb5b59894 Bug 5327: Add basic unit tests to some C4 modules
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
2010-10-30 22:32:31 -04:00
Nicole Engard e3732af7b9 create unit test files
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
2010-10-30 22:32:15 -04:00
Liz Rea dc472dfb01 Adding a simple test for Service.pm
At the advisement of the great Chris Cormack. (thanks for the lesson)

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
2010-10-30 22:31:57 -04:00
Galen Charlton ce5e2429db fixing various links to point to *.koha-community.org
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-10-21 22:08:24 -04:00
Galen Charlton 12d53ca26b Merge remote branch 'koha-fbc/k_bug_5284' into master
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-10-06 13:46:02 -04:00
Chris Nighswonger 63c527a10e Bug 5284 - Generic report covering various problems with the labels/patron card tests
This patch removes a very incomplete test script which was really not even formed into
a test routine.

Note: In all probability, the labels tests could be adapted to test patroncards as well.
2010-10-06 13:41:34 -04:00