Commit graph

454 commits

Author SHA1 Message Date
Paul Poulain
49b167e848 Bug 6875 de nesting C4::Biblio
C4::Biblio is used in many many places. The goal of this cleaning is to do from C4::Biblio a package with as many dependancies as possible.

* C4::Heading is called only in 1 place, highly rarely used (only in 1 misc/link_bibs_to_authorities.pl), moving to require
* PrepareItemrecordDisplay is a sub that is more related to Items, moving it here. It means some scripts that used this sub must be checked against use C4::Items
* C4::Items is needed in EmbedItemsInMarcBiblio, moving it only in this sub, and switching to require
* 2 subs are totally useless z3950_extended_services and set_service_options, removing them

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
No test plan included, but tested some opac and cataloging functions.
Code looks good. Marked as Passed QA.
2012-02-20 16:35:17 +01:00
Paul Poulain
46a5154df9 Bug 6137 follow-up, moving new test to db_dependent directory 2012-02-17 18:40:33 +01:00
Julian Maurice
76be6208ee Bug 6137: unit tests for C4::Circulation::_GetCircControlBranch
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-02-17 18:38:43 +01:00
Jonathan Druart
0200639b00 Bug 5346: Linking suggestions and orders.
Display suggestion info in acquisition module:
  basket.pl
  neworderempty.pl
  orderreceive.pl
  parcel.pl

To Test:
Create a suggestion and accept it.
Create a new order from this suggestion
Receive this order

For each step, check if suggestion info are visible.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Test provides more unit tests, all complete successfully.
perl t/db_dependent/Suggestions.t
Note: test case should be cleaned up after running tests.

Display changes are consistent and information about the suggestion
is shown on every important screen now.

I created an order from a suggestion and one from an existing record.

No problems found.
2012-02-17 10:27:52 +01:00
Paul Poulain
324615e396 Merge remote-tracking branch 'origin/new/bug_5327' 2012-02-13 15:06:16 +01:00
Chris Cormack
181f3b36ee Bug 5327 : Removing a broken test
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
2012-02-13 15:04:43 +01:00
Paul Poulain
28646dd550 Merge remote-tracking branch 'origin/new/bug_929' 2012-02-07 16:43:29 +01:00
Chris Cormack
6a06860f0c Bug 929 : Follow up, shifting test 2012-02-07 16:42:22 +01:00
Paul Poulain
5900dfff9a Merge remote-tracking branch 'origin/new/bug_5327' 2012-02-01 18:15:45 +01:00
Robin Sheat
8aacb28fc0 Bug 5327 - move another test around 2012-02-01 18:15:21 +01:00
Chris Cormack
227cafe8c2 Bug 5327: Shifting a db dependent test to the right place
Signed-off-by: Robin Sheat <robin@catalyst.net.nz>
2012-02-01 18:15:19 +01:00
Paul Poulain
d508f0244b Merge remote-tracking branch 'origin/new/bug_5327' 2012-01-31 17:30:28 +01:00
Sam Sanders
a0c1414f6d Bug 5327 added tests for C4/Languages.pm
Signed-off-by: Chris Hall <chrish@catalyst.net.nz>
2012-01-31 17:21:51 +01:00
Connor Dewar
597fabf4f4 Bug 5327 Added unit tests for C4/SIP/ILS/Transaction/Renew.pm
Signed-off-by: Chris Hall <chrish@catalyst.net.nz>
2012-01-31 17:21:51 +01:00
Bart Jorgensen
37c9ffcf7d Bug 5327 added unit tests for C4/TmplToken.pm
Signed-off-by: Chris Hall <chrish@catalyst.net.nz>
2012-01-31 17:21:50 +01:00
Kate Henderson
66fecdd798 Bug 5327 added unit tests for C4/Search_PazPar2.pm
Signed-off-by: Chris Hall <chrish@catalyst.net.nz>
2012-01-31 17:21:50 +01:00
Sam Sanders
77a9e9162e added unit tests for C4/Serials.pm
http://bugs.koha-community.org/show_bug.cgi?id=5327
2012-01-31 17:21:50 +01:00
Kate Henderson
1e2e7b9dd8 Bug 5327 added unit tests for C4/Scheduler.pm
Signed-off-by: Chris Hall <chrish@catalyst.net.nz>
2012-01-31 17:21:49 +01:00
Sam Sanders
0618b9db72 bug 5327 added unit tests for C4/Ris.pm
Signed-off-by: Chris Hall <chrish@catalyst.net.nz>
2012-01-31 17:21:49 +01:00
Jono Mingard
e81cbd7fe0 Bug 5327 added unit tests for C4/Creators/PDF.pm
Signed-off-by: Chris Hall <chrish@catalyst.net.nz>
2012-01-31 17:21:48 +01:00
Sam Sanders
200b5a8231 Bug 5327 added unit tests for C4/ClassSortRoutine/LCC
Signed-off-by: Chris Hall <chrish@catalyst.net.nz>
2012-01-31 17:21:48 +01:00
Jorgia Kelsey
1a20feb4ca Bug 5327 added unit tests for C4/Barcodes_PrinterConfig.pm
Signed-off-by: Chris Hall <chrish@catalyst.net.nz>
2012-01-31 17:21:48 +01:00
Jono Mingard
5579abe41f Bug 5327 added unit tests for C4/AuthoritiesMarc/MARC21.pm
Signed-off-by: Chris Hall <chrish@catalyst.net.nz>
2012-01-31 17:21:47 +01:00
Sam Sanders
3b9722c7dd Bug 5327 added tests for C4/Labels.pm
Signed-off-by: Chris Hall <chrish@catalyst.net.nz>
2012-01-31 17:21:47 +01:00
Sam Sanders
f918c57e89 bug 5327 added unit test for C4/Csv.pm
Signed-off-by: Chris Hall <chrish@catalyst.net.nz>
2012-01-31 17:21:47 +01:00
Colin Campbell
263dded818 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>
2012-01-27 12:11:06 +01:00
Chris Cormack
c77b8756f7 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>
2012-01-27 11:33:15 +01:00
Jonathan Druart
d12a381f49 Bug 5347: Followup change class for message + Unit test 2012-01-20 14:12:28 +01:00
Paul Poulain
a642b1c72a Merge remote-tracking branch 'origin/new/bug_5327' 2012-01-17 15:35:19 +01:00
Sam Sanders
dbb29b4042 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.
2012-01-17 15:31:56 +01:00
Connor Dewar
e96c92d077 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.
2012-01-17 15:31:56 +01:00
Connor Dewar
f053ca0c22 Bug 5327 Added unit tests for C4/ClassSortRoutine/Dewey.pm
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2012-01-17 15:31:55 +01:00
Connor Dewar
995485e574 Bug 5327 added unit tests for C4/ClassSortRoutine/Generic
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2012-01-17 15:31:55 +01:00
Paul Poulain
6456afea95 Bug 6990 follow up PODDOC & unit test updating
This patch removes the TransformKohaToMarcOneField sub, but there was some remaining POD & unit test about it
2012-01-17 12:07:03 +01:00
Paul Poulain
d7a51d83c1 Merge remote-tracking branch 'origin/new/bug_6132' 2012-01-16 14:53:08 +01:00
Julian Maurice
6eac5284ee 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>
2012-01-16 14:52:24 +01:00
Chris Cormack
55d0b65522 Bug 929 : Follow up adding unit tests, discovered C4::Dates cached the syspref with no way to clear it, fixed also. 2012-01-13 16:17:48 +01:00
Chris Cormack
e6bbb97942 Bug 929: Follow up adding the Koha:: namespace to the list of modules to test 2012-01-13 16:17:46 +01:00
Liz Rea
3c12d5f2f6 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>
2011-12-27 18:41:10 +01:00
bb92ac1ee0 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>
2011-12-27 17:56:03 +01:00
Srdjan Jankovic
6e07fd7b00 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>
2011-12-16 16:21:38 +01:00
Paul Poulain
a1ec828453 Merge remote-tracking branch 'origin/new/bug_5327' 2011-12-16 15:45:12 +01:00
Duncan Tyler
3ae23cd6cf 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>
2011-12-16 15:43:04 +01:00
Liz Rea
b955692c84 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>
2011-12-15 18:13:29 +01:00
Paul Poulain
8df873c1a2 Revert "Bug 5327: Added unit test for C4/SIP/ILS/Transaction/RenewAll.pm"
This reverts commit 06c822c37c.
2011-12-15 16:14:35 +01:00
Duncan Tyler
06c822c37c 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>
2011-12-15 13:52:50 +01:00
Chris Hall
64a9c64100 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>
2011-12-15 13:50:41 +01:00
Paul Poulain
e12fca0eb8 Merge remote-tracking branch 'origin/master' into new/bug_5327 2011-12-15 13:49:47 +01:00
Chris Hall
dfa4b73737 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>
2011-12-15 13:41:47 +01:00
Duncan Tyler
47b514cf56 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>
2011-12-15 13:41:43 +01:00
Duncan Tyler
bb79d37b87 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>
2011-12-15 13:41:41 +01:00
Duncan Tyler
7876d4fa8d 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>
2011-12-15 13:41:37 +01:00
Chris Cormack
9c66c42764 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>
2011-12-13 14:25:46 +01:00
Paul Poulain
484c1f6dea Merge remote-tracking branch 'origin/new/bug_7141' 2011-12-08 11:05:35 +01:00
Chris Cormack
ce59911932 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>
2011-12-08 10:51:25 +01:00
Chris Cormack
7dbb966b49 Bug 6679 : Allowing eval require
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2011-12-08 10:25:14 +01:00
Chris Cormack
dc6e1031f8 Bug 6679 : Adding license statement and stopping declaring variables in a conditional 2011-12-08 10:11:27 +01:00
Chris Cormack
a047dea5e4 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.
2011-12-08 10:11:23 +01:00
Paul Poulain
b9d743a928 Merge remote-tracking branch 'origin/master' into new/bug_6679
Conflicts:
	catalogue/showmarc.pl
2011-12-08 10:08:44 +01:00
Chris Cormack
4a14e7dbe6 Bug 6679: catalogue/ now passing perl critic tests
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2011-12-08 10:05:48 +01:00
Paul Poulain
e06f3ee0fa Jenkins complaining = fixing number of tests
(see jenkins build http://jenkins.koha-community.org/job/Koha_master/557/#showFailuresLink)
2011-12-07 18:04:10 +01:00
Paul Poulain
ffb544e8e4 t/UploadedFile, updated comment 2011-12-07 16:37:31 +01:00
Chris Cormack
94e1691a74 Bug 5327: Fixing the Members.t test
Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Confirm Members.t tests complete
2011-12-07 16:17:11 +01:00
Chris Cormack
dbe36a2bf3 Bug 5327 : Fixing unit test for SQLHelper.pm
Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Confirm that all SQLHelper tests pass.
2011-12-07 16:17:10 +01:00
Chris Cormack
19d071910f Bug 5327 : Complete coverage for BackgroundJob.pm
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Tests run without problems.
2011-12-07 16:17:08 +01:00
Chris Cormack
a9bbeae6cc Bug 5327 : Adding more unit tests
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
New tests run without problems.
2011-12-07 16:17:07 +01:00
Chris Hall
16c51d0376 Bug 5327: Unit tests for C4/Exteral/BakerTaylor.pm
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-12-07 16:17:05 +01:00
Maxime Pelletier
d2c101a8a9 fix test xml records
http://bugs.koha-community.org/show_bug.cgi?id=5327
2011-12-07 16:17:03 +01:00
Paul Poulain
13f29dd7f3 Test suite: ignoring backups from vi (files ending with a ~)
On my laptop, this test was failing because some scripts had a conflict marker in a backup ... of a conflict I just fixed!
ignoring any file ending with a ~
2011-12-07 15:17:54 +01:00
Ian Walls
d059079caf Bug 2346: Remove C4::Overdues::UpdateBorrowerDebarred in favour of C4::Members::DebarMember
Removes now-unused subroutine from C4::Overdues, as well as the db_dependent unit test

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-12-06 19:12:20 +01:00
Paul Poulain
d019b4c63a Bug 6328 Fixes for comment 35
* correctly indenting with tab the debarrcomment field
* setdebar.pl is called without status parameter, thus it is not working anymore. It's fixed & some dead code has been removed. To test : debar someone, then go to patron detail page and click "lift debarment"
* the test function had not been updated. The fix define a debarment date of 2099-12-31 (no limit)
2011-11-25 14:00:47 +01:00
Chris Nighswonger
a340ded2ca Bug 7095: Fixing cut and paste error and removing the use of diag() as this does not produce output when the test is run in a harness
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2011-11-18 22:51:28 +01:00
Srdjan Jankovic
18b8991cf1 bug_6253: Unified member Search()
Removed SearchMembers() and replaced with more generic Search()
Amended Search() to try cardnumber first
Replaced SearchMembers() calls with Search()
Replaced SELECT with Search() where appropriate
C4::SQLHelper:
- added support for '' key for search filter.
- when passing an array to filter, join with OR (rather than AND)
- added support for key => [val1, val2] in filter
- did not document - there was no input documentation to start with,
  and SQLHelper should be replaced with something better anyway

Signed-off-by: Liz Rea <lrea@nekls.org>
(again - testing merge issue)
The functionality of the patch seems to be maintained with Biblibre's changes.

I tested the following:
Extended attribute searching: works
3 part name searching: works
2 part name searching: works
1 part name searching: works

From:
mainpage.pl
members-home.pl
	Patron search limited by branch: Works
	Patron search limited by patron category: works
	Ordering by cardnumber instead of surname: works
The "Check Out" field in the masthead.

Circ Autocomplete is not reliably functional at this time, but the problem appears to predate this patch.
Signed-off-by: Ian Walls <ian.walls@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-10-19 16:23:02 +13:00
Paul Poulain
69732f5c62 Bug 7034: de-nesting C4/Branch.pm
use C4::Koha was loaded only to call C4::Koha::get_infos_of in get_branchinfos_of

the sub get_branchinfos_of was used nowhere
(checked with "grep -R get_branchinfos_of *")
only one reference was made to get_branchinfos_of, in reserve/request.pl, but the sub was not used in fact (maybe removed previously & silently)

This patch removes sub get_branchinfos_of and use C4::Koha in C4::Branch, as well as the reference in request.pl and the t test

The patch doesn't remove use C4::Branch in reserve/request.pl, as it's still used for other subroutines.

Signed-off-by: Ian Walls <ian.walls@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-10-19 03:23:31 +13:00
Srdjan Jankovic
4770555855 bug_5533: Slightly improved marking items as lost
Call LostItem() whenever item is lost.
LostItem() new arg - mark returned.
Disabled Lost Status on catalogue item edit.

Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com>

For follow up we need to explain how to hide the 952$1 (lost) from
the framework by putting it in the 'ignore' tab.

Signed-off-by: Ian Walls <ian.walls@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-10-18 09:01:39 +13:00
Chris Cormack
7244d5060b Fixing a broken test 2011-09-26 11:55:58 +13:00
MJ Ray
a746e11c14 Bug 6460: alternative fix, updating template and script instead of C4::Log
Add some test cases and fix a bug in C4::Log found by in review.
Thanks-to: Katrin Fischer.

Signed-off-by: Liz Rea <lrea@nekls.org>
Passes test, interface works as expected.

Signed-off-by: Liz Rea <lrea@nekls.org>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-09-24 10:01:09 +12:00
Chris Cormack
e1bb9e5137 Bug 6679 : Enable Critic tests for authorities and fixed resulting warnings
Signed-off-by: Ian <ian.walls@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-09-23 14:18:21 +12:00
Chris Cormack
7cdea5de35 Bug 6679 Fix scripts in admin & acqui to pass Perl::Critic
Scripts in admin & acqui subdirectores weren't passing t/00-testcritic.t. This
patch add admin & acqui scripts to test case and fix various errors related to
Perl::Critic compliancy.

- Fixing a style error to pass Perl::Critic, plus silencing a warn
- More style errors, plus fixing a security issue
- Explicitly using Carp

Contrary to common belief, subroutine prototypes do not enable
compile-time checks for proper arguments. Don't use them.

Defining a named sub within another sub, does not prevent that
subroutine being global

Signed-off-by: Frédéric Demians <frederic@tamil.fr>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-09-21 14:56:29 +12:00
Srdjan Jankovic
54d38461f0 Bug 6721 - improve searching in the acquisitions system
This allows a basket to be searched for by name or invoice number from
anywhere in the acquisitions system. It is accessible by clicking on
"orders search", clicking the '[+]' and filling in the basket or invoice
no. fields.

Author:    Srdjan Jankovic <srdjan@catalyst.net.nz>
Author:    Robin Sheat <robin@catalyst.net.nz>
Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com>
Signed-off-by: Ian Walls <ian.walls@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-08-26 11:34:27 +12:00
d2f49e1976 bug 5653: use itemcallnumber in bib label layouts
The sample bib label layouts and the hard-coded default
format_string for new layouts used 'callnumber' when they
should have used 'itemcallnumber', preventing call numbers
from being printed on spine labels that use the system-supplied
layouts.  Besides correcting the sample data, this patch
now also enshrines 'callnumber' as an alias for 'itemcallnumber'.
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
After applying patch it works for new and old layouts (itemcallnumber and callnumber).

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-06-13 11:15:34 +12:00
Chris Cormack
7aa3a05591 Merge remote-tracking branch 'kc/master' into new/bug_5683 2011-06-02 09:02:50 +12:00
Jared Camins-Esakov
d949472324 Add unit tests to ensure bug 5683 doesn't reappear
Signed-off-by: Jared Camins-Esakov <jcamins@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Ian Walls <ian.walls@bywatersolutions.com>
2011-06-02 08:46:40 +12:00
Colin Campbell
d8b362e0f9 Bug 5415 Let calls of SimpleSearch utilize considtent interface
Remove some unnecessary checks when check of error is
sufficient. Make the order in some cases more logical
Should remove some possibilities of runtime warning noise.
Although some calls belong to the 'Nothing could
ever go wrong' school have added some warnings

Signed-off-by: Christophe Croullebois <christophe.croullebois@biblibre.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-04-08 13:52:57 +12:00
b9cee99da4 Bug 5065 Add ability to choose framework on import
Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-03-21 20:36:35 +13:00
Julian Maurice
b1e3b6753e Follow up for bug 5880: Improved unit test
The unit test Koha.t now skip tests of the two subroutines if the insert
query failed.

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-03-18 09:10:43 +13:00
Julian Maurice
1eb9d9e581 Follow up for bug 5880: Added unit tests for the two new subroutines
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-03-18 09:10:40 +13:00
Colin Campbell
5f7b1a58f0 Bug 5485: Add script to run Test::Perl::Critic
Tests are run if TEST_QA environment variable is set
and Test::Perl::Critic is installed
e.g.
TEST_QA=1 prove =l t/00-testcritic.t

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-03-17 12:35:58 +13:00
Chris Cormack
8215cc8bad Bug 5595 : Fixing a security glitch (please always use placeholders or
dbh->quote and fixing the tests
2011-03-13 20:30:13 +13:00
Colin Campbell
0d082204ea Bug5063: C4::Bookseller Changes
Merge unfao changes to C4::Bookseller
Enable warnings in Bookseller.pm
Some cleanups in Bookseller code
Do not export everything by default
Display vendors more rationally
    Was displaying by id make it name as the searchstring is for all
    embedded substrings
Have removed "if mysql" logic as we want to deal with this by
    abstracting the DB interaction and it makes cleaner code until then

Sponsered by UN FAO, Rome

Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-03-12 08:42:26 +13:00
Robin Sheat
9df2a4a8fc 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>
2011-01-29 17:02:31 +13:00
Chris Cormack
d64008644a Bug 5327 fixing missing number of tests 2011-01-21 11:28:58 +13:00
Zach Sim
5f0f2e297a Added more unit tests to check when JSONStream should fail.
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-01-21 10:57:00 +13:00
Zach Sim
434d9a3c66 Bug 5327: Added unit tests to Output_JSONStream.t
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-01-21 09:52:17 +13:00
Chris Cormack
1c89ce34b9 Bug 5327: small typo in the Members.t test 2011-01-20 20:14:04 +13:00
johnboy
669280c7ab Bug 5327 Made test file for Accounts.pm
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-01-20 19:57:50 +13:00
Chris Cormack
314772637c Bug 5327: Shifting and little tidy up of the members tests 2011-01-20 11:53:06 +13:00
johnboy
d567945517 Bug 5327 Some tests added
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-01-20 11:33:01 +13:00
Chris Cormack
e03026adff Bug 5327 - Now we are doing db calls, we need to shift this to t/db_dependent 2011-01-19 13:38:52 +13:00
Zach Sim
b56121db02 Added unit tests to test all of get_amazon_tld in Amazon.pm.
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-01-19 13:38:15 +13:00
Chris Cormack
73f0857003 Merge remote branch 'kc/new/bug_5327' into kcmaster 2011-01-19 11:26:18 +13:00
Chris Cormack
23f92a8f8d Bug 5327: Little change to Record.t 2011-01-19 11:24:24 +13:00
johnboy
5aa8040875 Bug 5327 1 more test added.
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-01-19 11:04:37 +13:00
Zach Sim
65e2cda8d2 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>
2011-01-19 11:03:19 +13:00
Chris Cormack
22e5f27ff4 Merge remote branch 'kc/new/bug_5327' into kcmaster 2011-01-18 22:54:06 +13:00
Chris Cormack
4093615e9f Bug 5327 Cleaning up XISBN.t a bit 2011-01-18 22:52:02 +13:00
Chris Cormack
6c0b51460e Merge remote branch 'kc/new/bug_5327' into kcmaster 2011-01-18 19:55:12 +13:00
Chris Cormack
71a7d2ad38 Bug 5327 - Fixing a path issue with XISBN.t 2011-01-18 19:53:58 +13:00
Chris Cormack
c8ba99e155 Bug 5327 litte fix for Background tests 2011-01-18 16:35:08 +13:00
Chris Cormack
eff21765f9 Bug 5327 shifting database dependent modules and scripts to t/db_dependent 2011-01-18 16:18:37 +13:00
johnboy
cc039cdb0f bug 5327 updated test file
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-01-18 16:08:11 +13:00
Zach Sim
52762c6c79 Added unit tests using a test database for XISBN.
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-01-18 16:04:15 +13:00
Zach Sim
f2d575c92c Created unit testing using the testdatabase for XISBN.
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-01-18 16:03:11 +13:00
Zach Sim
3b22fc6cc0 Added extra unit tests to Debug.t
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-01-18 11:59:07 +13:00
johnboy
80f8c41e4c bug 5327 started testing
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-01-18 11:57:08 +13:00
johnboy
594a31bfe1 Bug 5327 Starting tests for BackgroundJob
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-01-18 11:56:48 +13:00
spartaness
3df717479c Bug 5327 Starting Unit Tests for Auth.pm
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-01-18 11:33:27 +13: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
073fb1aee6 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>
2011-01-13 06:44:46 +13:00
Colin Campbell
0d5029ec5b 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>
2011-01-12 19:30:40 +13:00
Henri-Damien LAURENT
63a8c5bc9d MT3801 followup : Cannot claim for issues
was missing an opening (
Adding test script

Signed-off-by: Colin Campbell <colin.campbell@ptfs-europe.com>
2010-12-15 13:30:47 +00:00
f36747f5e8 Fix for Bug 4473 - Recent comments view for the OPAC
- modifies opac-showreviews.pl to display recent comments for all
  titles, sorted in descending order by date.
- includes RSS feed
- includes (thanks to Chris N.):

[Enhancement][3.4] Add RFC822 Format to C4::Dates

This patch adds RFC822 formatting to C4::Dates. It also updates Dates.t
appropriately. Consult the POD for this module for how to use
this format.

Please note that this module *does not* handle TZ conversion at this point.
This means that the TZ portion of a RFC822 time will be truncated and the converted
time will be in the same TZ as was passed in. When generating an RFC822 time,
the local TZ offset will be included since none of the other supported formats
provide a means for including their TZ. This is not a problem introduced by the
addition of RFC822 formatting. Rather it is due to this module not having TZ
support to begin with.

Also note that the dow, moy abbreviations are English as required by
RFC822 section 3.3 (thanks to self for pointing that out).

Signed-off-by: Colin Campbell <colin.campbell@ptfs-europe.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2010-12-13 09:43:01 +13:00
Koustubha Kale
e4cbc4f421 Bug 5418: Rev-5 patch new itemBarcodeInputFilter for libsuite8 style barcodes
In India a ILS product called Libsuite8 prints barcodes like b0007432. The barcode is not stored anywhere in libsuite8's database. Neither is barcode available in any of the reports generated by the software.

The barcode 'b0007432' when scanned into the libsuite8 software is de-constructed like 'b' which is the itemtype i.e. Book in this instance, and '7432' which is the 'Accession Number'. The software then takes the logged in staff's branchcode and does a join on three tables 'Location', 'Media_Type', and 'Books' to retrieve the particular record from the database.

There is no possibility of recreating the barcodes for insertion in Koha while doing a retrospective conversion, because of arbitrary length of the barcode string AND arbitrary number of zeros in the numeric part of the printed barcode AND the fact that there are no reports available from the software which contain barcodes AND the fact that the barcode is not stored in the database.
But most importantly due to the simple fact that printed barcodes are duplicated among branches.

Therefore this patch emulates the functionality of Libsuite8 software of converting the scanned barcode into one stored in Koha using the itemBarcodeInputFilter system preference.

To use this new itemBarcodeInputFilter systempreference choice called 'libsuite8', the barcodes stored in Koha must match the pattern of <branchcode>-<itemtype_code>-<accession_number>. This is easy to achieve while doing retrospective conversion from Libsuite8 to Koha.

As expected the itemBarcodeInputFilter will return unmodified barcode if presented with a barcode of pattern <branchcode>-<itemtype_code>-<accession_number>

This revision corrects the way updatedatabase.pl is changed in order to correctly update version and insert the libsuite8 option in the database. Also kohaversion.pl is changed in the recommended format of 3.0X.0X.XXX to reflect database has changed.

This revision also changes the erronorous itemBarcodeInputFilter description in koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref from 'scanned patron barcodes' to 'scanned item barcodes' there by eliminating need for a separate patch for bug 5417.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>

1) applied patch to HEAD
2) set next database number in kohaversion.pl and updatedatabase.pl
3) webinstaller kicked in, update ok
4) typed the barcodes from test cases into check-in

Barcodes used my local branch code, everything seemed ok to me.
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2010-12-12 20:39:20 +13:00
Colin Campbell
78be08c73e 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>
2010-12-02 08:51:32 +13:00
4cef5ec961 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>
2010-11-14 09:37:27 +13:00
35d2008ef0 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>
2010-11-13 11:51:49 +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
Chris Cormack
af1d829031 Merge remote branch 'kc/new/bug_5386' into kcmaster 2010-11-12 06:41:25 +13:00
e3322f732e bug 5386: remove dep on Path::Class from t/00-load.t
File::Spec is a core module, Path::Class isn't; not yet
worth adding a new dependency.

Also some minor whitepace cleanup.

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2010-11-12 06:40:02 +13:00
Chris Cormack
235cf872a5 Merge remote branch 'kc/new/bug_5105' into kcmaster 2010-11-11 21:33:48 +13:00
5ebb5d4f4c Bug 5105 Regression test for switch statement
Add a test identifying Perl scripts and modules using switch statements.
This test file follow Chris pre-hook naming convention in order to be
triggered for patch submissions.

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2010-11-11 21:32:31 +13:00
Chris Cormack
7ecf2c2dc4 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>
2010-11-11 21:31:02 +13:00
Chris Cormack
c836b63a7d 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>
2010-11-04 20:05:36 +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
7fd5071e67 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>
2010-11-01 15:35:52 +13:00
Katrin Fischer
e0892a5139 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>
2010-11-01 15:35:50 +13:00
Nate Curulla
cea1ef2720 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>
2010-10-31 22:16:47 +13:00
Daniel Grobani
c45b18251e unit test stub for Z3950.pm
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2010-10-31 10:33:35 +13:00
Brian Engard
69037606f5 Create Unit Test for ImportBatch
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2010-10-31 10:32:29 +13:00
Magnus Enger
d15790d9c5 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>
2010-10-30 20:22:30 +13:00
Katrin Fischer
cc9a34c274 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>
2010-10-30 20:12:53 +13:00
Nicole Engard
88acebeebe create unit test files
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2010-10-30 20:12:50 +13:00
Liz Rea
12f9aa973d 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>
2010-10-30 20:12:47 +13:00
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
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
7041f19ee1 Merge remote branch 'koha-fbc/k_bug_5284' into master
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-10-06 13:38:44 -04:00
Chris Nighswonger
04a0d94295 Bug 5284 - Generic report covering various problems with the labels/patron card tests
This patch fixes the C4::Labels::Template tests
2010-10-06 13:33:16 -04:00