Commit Graph

336 Commits

Author SHA1 Message Date
Chris Cormack 6f251690ff Bug 5327 : Removing a broken test
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
(cherry picked from commit 181f3b36ee)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
2012-02-19 21:00:20 -05:00
Chris Cormack 07af219057 Bug 929 : Follow up, shifting test
(cherry picked from commit 6a06860f0c)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
2012-02-19 21:00:16 -05:00
Robin Sheat 316dc62867 Bug 5327 - move another test around
(cherry picked from commit 8aacb28fc0)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
2012-02-19 21:00:02 -05:00
Chris Cormack e0612c01d9 Bug 5327: Shifting a db dependent test to the right place
Signed-off-by: Robin Sheat <robin@catalyst.net.nz>
(cherry picked from commit 227cafe8c2)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
2012-02-19 21:00:01 -05:00
Sam Sanders ed9eac7dd0 Bug 5327 added tests for C4/Languages.pm
Signed-off-by: Chris Hall <chrish@catalyst.net.nz>
(cherry picked from commit a0c1414f6d)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
2012-02-19 20:59:58 -05:00
Connor Dewar bb06b9ac1b Bug 5327 Added unit tests for C4/SIP/ILS/Transaction/Renew.pm
Signed-off-by: Chris Hall <chrish@catalyst.net.nz>
(cherry picked from commit 597fabf4f4)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
2012-02-19 20:59:58 -05:00
Bart Jorgensen 669ec24c28 Bug 5327 added unit tests for C4/TmplToken.pm
Signed-off-by: Chris Hall <chrish@catalyst.net.nz>
(cherry picked from commit 37c9ffcf7d)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
2012-02-19 20:59:57 -05:00
Kate Henderson 91aab0fddf Bug 5327 added unit tests for C4/Search_PazPar2.pm
Signed-off-by: Chris Hall <chrish@catalyst.net.nz>
(cherry picked from commit 66fecdd798)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
2012-02-19 20:59:57 -05:00
Kate Henderson a36582632d Bug 5327 added unit tests for C4/Scheduler.pm
Signed-off-by: Chris Hall <chrish@catalyst.net.nz>
(cherry picked from commit 1e2e7b9dd8)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
2012-02-19 15:54:04 -05:00
Sam Sanders 88aee70187 bug 5327 added unit tests for C4/Ris.pm
Signed-off-by: Chris Hall <chrish@catalyst.net.nz>
(cherry picked from commit 0618b9db72)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
2012-02-19 15:54:03 -05:00
Jono Mingard cbccfdbb61 Bug 5327 added unit tests for C4/Creators/PDF.pm
Signed-off-by: Chris Hall <chrish@catalyst.net.nz>
(cherry picked from commit e81cbd7fe0)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
2012-02-19 15:54:03 -05:00
Sam Sanders 2d113b9303 Bug 5327 added unit tests for C4/ClassSortRoutine/LCC
Signed-off-by: Chris Hall <chrish@catalyst.net.nz>
(cherry picked from commit 200b5a8231)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
2012-02-19 15:54:03 -05:00
Jorgia Kelsey dbf3a3df34 Bug 5327 added unit tests for C4/Barcodes_PrinterConfig.pm
Signed-off-by: Chris Hall <chrish@catalyst.net.nz>
(cherry picked from commit 1a20feb4ca)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
2012-02-19 15:54:03 -05:00
Jono Mingard 675315473a Bug 5327 added unit tests for C4/AuthoritiesMarc/MARC21.pm
Signed-off-by: Chris Hall <chrish@catalyst.net.nz>
(cherry picked from commit 5579abe41f)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
2012-02-19 15:54:02 -05:00
Sam Sanders 60bf1f0594 Bug 5327 added tests for C4/Labels.pm
Signed-off-by: Chris Hall <chrish@catalyst.net.nz>
(cherry picked from commit 3b9722c7dd)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
2012-02-19 15:54:02 -05:00
Sam Sanders 329e39b8cc bug 5327 added unit test for C4/Csv.pm
Signed-off-by: Chris Hall <chrish@catalyst.net.nz>
(cherry picked from commit f918c57e89)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
2012-02-19 15:54:02 -05:00
Colin Campbell 960da426a8 Bug 6752: Be stricter with utf-8 encoding of output
use encoding(UTF-8) rather than utf-8 for stricter
encoding
Marking output as ':utf8' only flags the data as utf8
using :encoding(UTF-8) also checks it as valid utf-8
see binmode in perlfunc for more details
In accordance with the robustness principle input
filehandles have not been changed as code may make
the undocumented assumption that invalid utf-8 is present
in the imput
Fixes errors reported by t/00-testcritic.t
Where feasable some filehandles have been made lexical rather than
reusing global filehandle vars

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
(cherry picked from commit 263dded818)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
2012-02-19 15:51:19 -05:00
Chris Cormack 3c52fd6f8e Updating perlcriticrc to allow Modern::Perl to suffice instead of use warnings; and use strict;
http://bugs.koha-community.org/show_bug.cgi?id=6836

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
(cherry picked from commit c77b8756f7)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
2012-02-19 15:48:26 -05:00
Sam Sanders d297f4d267 bug 5327 add tests for C4/BackgroundJob.pm
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
perl t/db_dependent/BackgroundJob.t
All tests complete successfully.

Note: Test 11 does not tell what it's about, but it has been there before.
(cherry picked from commit dbb29b4042)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
2012-01-18 10:11:01 -05:00
Connor Dewar e44ed03423 Bug 5327 Added unit tests for C4/Reports.pm
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
perl t/Reports.t b/t/Reports.t
All tests complete successfully.
(cherry picked from commit e96c92d077)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
2012-01-18 10:11:00 -05:00
Connor Dewar e4d759ff52 Bug 5327 Added unit tests for C4/ClassSortRoutine/Dewey.pm
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
(cherry picked from commit f053ca0c22)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
2012-01-18 10:11:00 -05:00
Connor Dewar 9bcc15b3f1 Bug 5327 added unit tests for C4/ClassSortRoutine/Generic
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
(cherry picked from commit 995485e574)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
2012-01-18 10:10:59 -05:00
Paul Poulain 44f9128266 Bug 6990 follow up PODDOC & unit test updating
This patch removes the TransformKohaToMarcOneField sub, but there was some remaining POD & unit test about it
(cherry picked from commit 6456afea95)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
2012-01-18 10:10:58 -05:00
Julian Maurice 14720f508d Bug 6132: Add unit test for system preferences
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
(cherry picked from commit 6eac5284ee)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
2012-01-18 10:10:56 -05:00
Chris Cormack 7d4cc170ed Bug 929 : Follow up adding unit tests, discovered C4::Dates cached the syspref with no way to clear it, fixed also.
(cherry picked from commit 55d0b65522)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
2012-01-18 10:10:55 -05:00
Chris Cormack bd05f46d12 Bug 929: Follow up adding the Koha:: namespace to the list of modules to test
(cherry picked from commit e6bbb97942)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
2012-01-18 10:10:55 -05:00
Liz Rea 0668963124 Bug 7333 - Fixing up db_dependent/Search.t to use sample data Thanks to Chris N. for helping figure out that it was because there were no French stopwords in the DB that the test was failing.
Patch changes the French string (with French stopwords) to an English string with English stopwords, as only English stopwords are installed in the default data.

This patch will allow Search.t to run on the database attached to this bug.

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
(cherry picked from commit 3c12d5f2f6)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
2012-01-16 15:54:48 -05:00
Chris Cormack 28c00dd146 Test to check for XXX in kohaversion.pl or updatedatabase.pl
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Works as advertised.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Amended the original patch of Chris to add two exceptions for a line in SetVersion and TransferToNum.

http://bugs.koha-community.org/show_bug.cgi?id=6700
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
(cherry picked from commit bb92ac1ee0)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
2012-01-16 15:47:28 -05:00
Srdjan Jankovic da99978777 bug_2830: Remove reserve when checking out if the borrower is not the first one in the reserve queue
To test:
Create 4 holds on a bib, for patrons A, B, C, and D,

Check in the item to mark hold as waiting for patron A
Check out the item to patron B -> reserve for patron B should be removed
Check in the item to mark hold as waiting for patron A
Check out the item to Patron A, hold should complete normally
Check in the item to mark hold as waiting for patron C
Check out the item to patron D -> reserve for patron D should be removed.
Check in the item to mark hold as waiting for patron C
Check out the item to patron C, hold should complete normally
Check in the item -> there should be no more reserves.

We also tested:
Created 4 holds on a bib with two items, for patrons A, B, C, and D

All worked as expected.

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
(cherry picked from commit 6e07fd7b00)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
2012-01-16 15:43:07 -05:00
Duncan Tyler 4e64d14700 Bug 5327: Added unit test for C4/SIP/ILS/Transaction/RenewAll.pm
http://bugs.koha-community.org/show_bug.cgi?id=5327
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Test requires a database installed using the sample data.
All tests pass.

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
(cherry picked from commit 3ae23cd6cf)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
2012-01-16 15:43:06 -05:00
Liz Rea 3a42ff5d67 Bug 7333 - modifying Members.t to use a branchcode that exists in the sample data
To test:
Create a fresh koha db with all of the sample data (if you have one that has the sample branches in it, that will work too)
run the test: prove t/db_dependent/Members.t

All subtests should complete.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
All tests complete successfully with my database created from
sample data and with the database provided on the bug.

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
(cherry picked from commit b955692c84)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
2012-01-16 15:43:03 -05:00
Paul Poulain 2f95419c36 Revert "Bug 5327: Added unit test for C4/SIP/ILS/Transaction/RenewAll.pm"
This reverts commit 06c822c37c.
(cherry picked from commit 8df873c1a2)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
2012-01-16 15:43:01 -05:00
Duncan Tyler caf02e8dca Bug 5327: Added unit test for C4/SIP/ILS/Transaction/RenewAll.pm
http://bugs.koha-community.org/show_bug.cgi?id=5327
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Test requires a database installed using the sample data.
All tests pass.

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
(cherry picked from commit 06c822c37c)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
2012-01-16 15:43:00 -05:00
Chris Hall 31efcea6ca Added missing reference case to Boolean.t and corrected count
http://bugs.koha-community.org/show_bug.cgi?id=5327
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Test passes.

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
(cherry picked from commit 64a9c64100)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
2012-01-16 15:43:00 -05:00
Chris Hall c8f04b8e7b Added missing reference case to Boolean.t and corrected count
http://bugs.koha-community.org/show_bug.cgi?id=5327
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Test passes.

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
(cherry picked from commit dfa4b73737)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
2012-01-16 15:42:59 -05:00
Duncan Tyler fc2a6415a9 Added unit tests for Scrubber
http://bugs.koha-community.org/show_bug.cgi?id=5327
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Test passes.

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
(cherry picked from commit 47b514cf56)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
2012-01-16 15:42:59 -05:00
Duncan Tyler b418a16623 Added unit test for AuthoritiesMarc/UNIMARC.pm
http://bugs.koha-community.org/show_bug.cgi?id=5327
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Test passes.

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
(cherry picked from commit bb79d37b87)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
2012-01-16 15:42:58 -05:00
Duncan Tyler 3aa19f2186 Added unit tests for Sip Checksum.pm
http://bugs.koha-community.org/show_bug.cgi?id=5327
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Test passes.

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
(cherry picked from commit 7876d4fa8d)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
2012-01-16 15:42:58 -05:00
Chris Cormack 5e57830a18 Bug 7215 : The Module changed, but the tests weren't updated to reflect that
Updating the test

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
(cherry picked from commit 9c66c42764)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
2011-12-13 09:37:26 -05:00
Chris Cormack cbc13b7070 Bug 7141 : Changing test to match new formatting of xsl style sheet
http://bugs.koha-community.org/show_bug.cgi?id=7141
Signed-off-by: Liz Rea <wizzyrea@gmail.com>
verified tests pass

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
(cherry picked from commit ce59911932)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
2011-12-08 14:46:32 -05:00
Chris Cormack 12ea57b606 Bug 6679 : Adding license statement and stopping declaring variables in a conditional
Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
2011-12-08 14:43:05 -05:00
Chris Cormack c5e6163efb Bug 6679 : cataloguing/ now passing critic tests
Declare variables outside of conditionals
Don't use prototypes http://www.modernperlbooks.com/mt/2009/08/the-problem-with-prototypes.html
Use ":encoding(UTF-8)" to get strict validation.

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
2011-12-08 14:43:05 -05:00
Chris Cormack a8274cdfde Bug 6679: catalogue/ now passing perl critic tests
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
2011-12-08 14:43:04 -05:00
Chris Cormack ffe3972d5e Bug 6679 : Allowing eval require
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
(cherry picked from commit 7dbb966b49)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
2011-12-08 11:06:44 -05:00
Paul Poulain bdfd09657e Jenkins complaining = fixing number of tests
(see jenkins build http://jenkins.koha-community.org/job/Koha_master/557/#showFailuresLink)
(cherry picked from commit e06f3ee0fa)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
2011-12-08 11:05:18 -05:00
Paul Poulain 2d2bfde559 t/UploadedFile, updated comment
(cherry picked from commit ffb544e8e4)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
2011-12-07 11:36:03 -05:00
Chris Cormack d2aec1a738 Bug 5327: Fixing the Members.t test
Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Confirm Members.t tests complete
(cherry picked from commit 94e1691a74)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
2011-12-07 11:34:10 -05:00
Chris Cormack 5efe1b117a Bug 5327 : Fixing unit test for SQLHelper.pm
Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Confirm that all SQLHelper tests pass.
(cherry picked from commit dbe36a2bf3)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
2011-12-07 11:34:09 -05:00
Chris Cormack a913e9d7b3 Bug 5327 : Complete coverage for BackgroundJob.pm
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Tests run without problems.
(cherry picked from commit 19d071910f)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
2011-12-07 11:34:09 -05:00
Chris Cormack f8b401e723 Bug 5327 : Adding more unit tests
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
New tests run without problems.
(cherry picked from commit a9bbeae6cc)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
2011-12-07 11:34:09 -05:00