Commit graph

270 commits

Author SHA1 Message Date
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
Chris Nighswonger
04601a3b4d Bug 5284 - Generic report covering various problems with the labels/patron card tests
This patch fixes the C4::Labels::Profile tests
2010-10-06 13:28:18 -04:00
Chris Nighswonger
a115a474c1 Bug 5284 - Generic report covering various problems with the labels/patron card tests
This patch fixes the C4::Labels::Layout tests
2010-10-06 13:17:32 -04:00
6049aeeacb fix invalid invocation of GetBranches in test case
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-10-06 12:54:21 -04:00
Chris Nighswonger
49f7faf34a Bug 5284 - Generic report covering various problems with the labels/patron card tests
This patch fixes the C4::Labels::Batch tests
2010-10-06 12:52:55 -04:00
d243847c0a more test case fixes
SQLHelper.t - clean up after itself better
Context.t - fix reporting of test plan

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-10-06 11:56:32 -04:00
917c397968 cleanup of DB-dependent fund test cases
* remove test that was adding a second active budget period,
  which was throwing off later tests
* updated to reflect current API

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-10-06 11:13:07 -04:00
01bf4aa658 fix typo/thinko in list test
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-10-06 10:55:44 -04:00
037686eff2 various improvements to t/db_dependent/VirtualShelves.t
* updated to reflect recent (and old) changes to the API
* corrected test plan
* adopted Test::More
* correctly handle and test functionality to not add duplicate
  bibs to a list

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-10-06 10:39:57 -04:00
58e2f6a991 fix test plan and false test errors in Search.t
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-10-06 09:51:55 -04:00
f19307b54c fix test plan for SQLHelper.t
Also removed incorrect comments about test case numbers - we should
just let Test::More number them.

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-10-06 09:44:18 -04: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
Chris Cormack
d82c1cf05f Shifting the tests that need user input to their own directory, they cant be used by the automated tester
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-10-06 07:58:35 -04:00
Chris Cormack
9b0bd43f10 Fixing the VirtualShelves test
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-10-06 07:58:34 -04:00
Chris Cormack
6d581f9f6b Fixing C4::Boolean tests, in August 2009 we changed the die to a warn, tests didn't reflect this. Now we should have 100% of C4::Boolean
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-10-06 07:58:33 -04:00
Colin Campbell
6a1191bb3f Bug 4905 Runtime errors in about.pl
Calls to VERSION were generating errors when called on a string.
Use a bit of sleight of hand to avoid this
Added a couple of tests on Installer/PerlModules
Module needs better coverage testing (esp on newer perls)
Sorted to list of modules to make koha_perl_deps.pl more
human-friendly

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-06-24 14:16:36 -04:00
Henri-Damien LAURENT
09d0a978a7 Fixing Tests on SQLHelper
one test was failing for want of correct parameters
An other one was not correctly described

test on search with a simple string fails because was done with branchcode and start_with includes NULL branches
Removing branchcode from filtercolumns

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-04-29 22:35:28 -04:00
Donovan Jones
23a19c6c9a Bug 2505 - Add commented use warnings where missing in *.t 2010-04-21 20:29:31 +12:00
Colin Campbell
d027e4dcd6 add warnings to Serials.pm
Change obvious warning generators:
     ( use of string comparisons in numeric comparison)
     ( declaration of variable in comnditional )
also some errors caused by undefined values:
    abouttoexpire was not checking for undef values
    Pass a valid planneddate in generation of next expected
    (undef here causes odd results)
Add a basic test script
    test is minimal but I fell over a bug this would have caught
2010-04-08 13:28:40 +01:00
Lars Wirzenius
13af9b6195 Fix FSF address in directory t/
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-03-16 20:17:51 -04:00
Colin Campbell
7ea29365df bugfix Dates.t test plan has wrong value
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-02-10 05:53:28 -05:00
f36c042b80 Merge commit 'workbuffer.org-koha/translation' into to-push
Conflicts:
	installer/data/mysql/updatedatabase.pl

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-02-02 19:10:41 -05:00
088b22b8ed More fixes to the shelves test 2010-01-29 08:39:09 +13:00
031a7c8379 Fixing the tests for VirtualShelves, still a bit more to do 2010-01-29 08:39:08 +13:00
98e972128a More fixes to the shelves test 2010-01-29 08:13:42 +13:00
af75714431 Fixing the tests for VirtualShelves, still a bit more to do 2010-01-29 08:13:41 +13:00
Henri-Damien LAURENT
2086615a35 SQLHelper : InsertInTable enhancement
InsertInTable can now add values to table where primaryKey requires
user input such as branches table
2010-01-28 15:11:54 +01:00
Henri-Damien LAURENT
6a3579b2f3 MT 2285 : enhancement for patronSearch 2010-01-28 15:11:51 +01:00
Henri-Damien LAURENT
67bc72d7bb Test Improvements : Adding Reserves.t 2010-01-28 15:11:49 +01:00
Henri-Damien LAURENT
23a1397419 Dates : improvements string recognition
Dates can now have one digit for month and day
2010-01-28 15:11:47 +01:00
Henri-Damien LAURENT
697e8e7014 SearchInTable : problem with primary key searches
SearchInTable was filtering primary Key thus returning the whole table when asked a search on a primary key
2010-01-28 15:11:45 +01:00
Henri-Damien LAURENT
d339abf0bf Merge branch 'patroncards-wip' of git://git.foundations.edu/koha into community
Conflicts solved:
	Makefile.PL
	installer/data/mysql/en/mandatory/sysprefs.sql
	installer/data/mysql/fr-FR/1-Obligatoire/unimarc_standard_systemprefs.sql
	installer/data/mysql/updatedatabase.pl
	kohaversion.pl
2010-01-20 23:16:34 +01:00
Chris Nighswonger
278007e847 [3/30] Adding a test script for C4::Patroncards::Patroncard
To be used for development initially and then can be modified for use as a test.

NOTE: This does not work in its present form.
2010-01-11 18:16:17 -05:00
Jesse Weaver
09d153d85a Remove diagnostic output from t/Members_Attributes.t
While this might be useful for developers, is mostly pointless
otherwise. Should be replaced with a true test of these four
functions.
2009-12-20 14:31:39 +01:00
e85b4557f9 C4::Bookfund no longer exists, removing the test 2009-12-20 14:31:37 +01:00
11c0adea4e C4::Boolean has had its' exception changed to warns, the test was erroring falsely 2009-12-20 14:31:36 +01:00
Henri-Damien LAURENT
fc1a5ed318 MT1883 : Serials enddate was not cleanly used
GetExpirationDate should now be used only to get the NEXT expirationdate based on startdate
Perltidying C4/Serials.pm
2009-11-11 14:00:11 +01:00
Henri-Damien LAURENT
1ec6e3df73 Change in API : ordnum becomes ordernumber 2009-10-30 00:30:47 +01:00
Henri-Damien LAURENT
e3a8f1e20d MT 2168 : Logical AND between multiple words strings
C4::SQLHelper was doing an implicit OR of multiple words strings
It is now fixed and does an AND
2009-10-26 15:34:33 +01:00
Henri-Damien LAURENT
e16a034e9c Remove Stopwords bug fixing
in french, les is a stopword

Modèles would match because of the combining and \P{IsAlnum} would not detect that.
2009-10-14 18:19:09 +02:00
Henri-Damien LAURENT
70a6b86c74 Improving SQLHelper
More concise and more readable
removing do local $"= using join instead
Adding Caching of queries
Adding Some tests
API between function reorganizing for more consistency
2009-09-30 11:30:37 +02:00
Henri-Damien LAURENT
2a4f2098b4 Improving C4::SQLHelper
Adding support for string, hash and arrayref in SearchIntable
SearchInTable now add
	limits and
	sortby
	filter on fields to returns (enter an arrayref here)
	filter on fields to limit the search on
	searchtype which can be exact or wide

GetPrimaryKey now returns an array of all the fields which are primary keys
Adding Internal functions
_Process_Operands
_filter_hash
_filter_string
_filter_fields
2009-09-30 11:30:36 +02:00
Nahuel ANGELINETTI
d399ff3494 [biblibre-newacq](bug #3611) fix user interface and others
This big patch, fix xhtml code, and user interface.
It Delete the term of budget period and use it as "Root Budget".
It add improvment on UI, adding tooltip, and table tree.
2009-09-30 11:30:34 +02:00
Henri-Damien LAURENT
e53b5e10ed Adding some fields in GetSubscriptions
GetSubscriptions now searches string in
notes
internalnotes
callnumber
title
2009-09-30 11:30:33 +02:00
Henri-Damien LAURENT
e3a9d21d6e Improving and bug fixing admin/aqbudgets
Adding FormatData and FormatNumber in C4::Output
Using them
Adding duplication detection for budget periods
Factorizing some code
2009-09-30 11:30:30 +02:00
Paul Poulain
90141c2b32 Test script, removing Bookfund references 2009-09-30 11:30:22 +02:00
Henri-Damien LAURENT
8802bbf5fe Editing C4::Suggestions.pm
Enhancing C4::SearchSuggestion
And changing its API
Changing C4::Suggestions API taking a hashref for NewSuggestion and ModSuggestion

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2009-09-30 11:29:23 +02:00
Henri-Damien LAURENT
4271bbb738 Modifying Members : Add Mod and GetMember
This update the way Member is added and editing so that import and Edition
 could be best automatized
GetMember evolves and allow ppl to serach on a hash of data

Adding SQLHelper A new package to deal with INSERT UPDATE and SELECT

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2009-09-30 11:29:23 +02:00
Nahuel ANGELINETTI
17c831399f Delete unused function
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2009-09-29 19:53:04 -04:00
Chris Nighswonger
c25dc92fd1 Bug 2500 Correcting incorrect splitting of cutter numbers
This patch does two things to improve the call number splitting algorithms:

1. It makes changes to ensure that cutter numbers are split correctly in ddcns

2. It moves custom/fiction/biography call number splitting to a separate algorithm.
    Before they were incorrectly placed in ddcns.

This patch also modifies the call number splitting tests to accept call numbers from the
command line to allow quick testing of any give call number against a particular algorithm.

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2009-09-15 20:29:16 -04:00
8b296fc778 updated DB-dependent tests to reflect labels rewrite
* removed lib/KohaTest/Labels.pm, which is now completely outdated
* updated list of database tables to truncate in lib/KohaTest.pm

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2009-09-15 08:59:26 -04:00
0bbcfeda0e replace syslog with warns
As discussed with Chris Nighswonger on #koha, this patch
removes the calls to syslog and replaces them with warns
so that error messages generated by the labels code
are sent to the Apache error log.  This avoids splitting
this sort of logging across multiple files and is consistent
with current practice in most of the rest of Koha.

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2009-09-05 21:43:12 -04:00
Chris Nighswonger
6066b79817 [38/40] Misc bugfixs 2009-09-01 15:57:46 -04:00
Chris Nighswonger
9b56b1ead9 [35/40] Work on C4::Labels tests and various bugfixs resulting
This patch also moves the Labels tests into their own sub directory.

Due to a squash mistake this patch also includes the following:

Fixing up POD for C4::Labels modules

Also a minor bugfix and code refactoring.
2009-09-01 15:54:01 -04:00
Chris Nighswonger
537880591a [3/40] Work on C4::Labels::Profile module and tests 2009-09-01 15:47:52 -04:00
Chris Nighswonger
1c39484c4b [2/40] Work on C4::Labels::Template and associated tests
This commit also contains some work on C4::Labels::Layout as well
2009-09-01 15:47:32 -04:00
Chris Nighswonger
f4d46222e8 [1/40] Work on C4::Labels::Layout module and tests
NOTE: This patch is the first of 40 which almost completely re-factor the
label creator code into a hopefully more scalable form. The new format is
a move in direction of OO handling labels, batches, templates, layouts, and
profiles as objects thus permitting easier implementation of features and
enhancements. It should be possible to export label data in any format one
might choose with the simple addition of a script similar to those included
which produce pdf, csv, and xml format.

One of the larger improvements is a change in workflow that results in template,
layout, and start label selection occurring just before export.

There are also various bugfixes and smaller interface improvements woven into it.

It should be noted that this patch series removes the patron card creator feature
for the present. This feature was only partially completed. A completed variation
will be submitted as a separate patch series to follow in the near future.

The following bugs and enhancements are fixed by this series of patches:

2944 Search to add items to a label batch broken
2061 labels_conf DB values: NULL vs. 0
2511 CSV format string is not cleared when unselected in the label layout editor
2515 Re-factor C4::Labels::DrawSpineText
2823 Label Generator not generating barcodes
3171 Problem due to internationalization in label-create-template.tmpl in de-DE and possibly others
3180 Active settings for label settings should be set at print time only

This work was sponsored by Foundations Bible College & Seminary, Dunn, NC USA
2009-09-01 15:15:45 -04:00
ae5b76c89b bug 2157: add ability to 'clean' staged record batches
batches, it is now possible to 'clean' a batch by
removing all bib and item records staged in the batch.  This
has the effect of helping to reduce database space used
by old import batches as well as removing staged records
from the cataloging reservoir search.  Note that 'cleaning'
a batch affects only the copies of the records that were staged;
if the batch was committed, cleaning the batch does not
affect any bibs and items that were committed into the catalog.

Also note that once you clean a committed batch of records, it is
impossible to undo the previous commit operation.

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2009-08-10 20:34:55 -04:00
Joe Atzberger
51e8fc2cb6 bug 3435: AddReturn overhaul.
Required for SIP checkin implementation, but also for internal correctness.
AddReturn had too many things going on, with no guarantee of data being
available for the later calls.  At some point we started tacking on all the
branch transfer logic without testing edge cases.  In particular, $borrower
is not checked to be sure it is defined, considering the item may not have been
checked out so no borrower would be associated.  That means that CircControl
of "PatronLibrary" would be inaccurate, Circ Alerts will be totally confused
(untargeted), and the Fix... subs would fail.

Note that *many* errors are still present in _FixAccountForLostAndReturned, including
those where comments are added, such that it might behave strangely even with $borrower.

Renamed the internal subs with leading underscore, per convention.  Changed
the arguments to be scalars when only scalars are needed, not entire objects.
Added depth to WrongBranch message that includes Rightbranch.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-07-30 11:06:50 -04:00
Galen Charlton
2d880c73d1 removing disused C4::Serials functions
The following functions are no longer in use:

* old_newsubscription
* old_modsubscription
* old_getserials

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-06-09 09:31:12 -05:00
Galen Charlton
ecdf595208 bug 3314: remove disused scripts and API functions
The distributedto column of the subscription table is
no longer used, having been replaced by the serials
routing list table.  This patch removes two C4::Serials
functions and a script and template, none of which were
reachable by current code:

C4::Serials::GetDistributedTo()
C4::Serials::SetDistributedTo()
koha-tmpl/intranet-tmpl/prog/en/modules/serials/distributedto.tmpl
serials/distributedto.pl

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-06-08 17:03:05 -05:00
Galen Charlton
c53c9ff8c6 bug 3303: removed references to news_channels*
Removed routines in C4/NewsChannels.pm that refered
to missing database tables news_channels and news_channel_categories.

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-06-07 20:09:18 -05:00
Galen Charlton
456e2a65b3 bug 3302: removed disused references to opac_electronic
Removed routines in C4/NewsChannels.pm that refer to
a missing opac_electronic table.

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-06-07 20:09:17 -05:00
Joe Atzberger
82f362673c Allow option to preserve Extended Attributes on patron import update.
Essentially, this patch provides the option to overwrite only matching
Extended Attributes, instead of all of them, treating the ext. fields more
like normal fields.

Several functions added to Members::Attributes with corresponding tests.

[ LL ref. 342 ]

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-05-28 06:50:39 -05:00
Chris Nighswonger
e72a02e08b Bug 2500 Tweaking DDCN Split for Hyphenated Volumn Numbers
Presently 252.051 T147 v.1-2 is split as

252.051
T147
v.1
-2

This patch corrects the algorithm so that it splits as

252.051
T147
v.1-2

It also updates Labels_split_ddcn.t to include this particular case.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-05-27 10:45:36 -05:00
Galen Charlton
d8bd2345ed bug 3120: tweak DDCN call number splitting for labels
Allow a call number of the form MP3-CD F PARKER to be split as

MP3-CD
F
PARKER

instead of

MP
3
-CD
F
PARKER

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-05-21 08:01:41 -05:00
Galen Charlton
3f49ad62c8 bug 3236: remove disused scripts and a function
Removed opac/opac-dictionary.pl and catalogue/dictionary.pl,
which were not in use and not linked to from any active
template files.  According to Henri, the functionality that
these scripts implemented hasn't been working since 2.2.

Also removed C4::Search::findseealso(), which was used
only by the two scripts.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-05-20 08:37:58 -05:00
Galen Charlton
b244cac492 bug 3120: tweak splitting of Dewey call number
If a call number prefix contains a hyphen, try not to
split on the hyphen.  For example, rather than
splitting the call number 'CD-ROM 787.87 EAS'
like this:

CD
-ROM
787.87
EAS

it should be

CD-ROM
787.87
EAS

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-05-11 07:47:09 -05:00
Galen Charlton
2e08f626f5 remove incomplete bib bulk editing code
Per discussion I had with Henri, removing experimental
bulk editing from the staff search results code, as
feature is incomplete and can be dangerous if
one tries to use it on a large search result
set.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-04-06 10:53:50 -05:00
Joe Atzberger
657371808a DDCN callnumber splitting with test.
Similar to previous patch for LCCN splitting, this patch incorporates
changes to split_ddcn and supplies a test file for verifying proper
operation.  Note that the only previously documented example for intended
operation is included as one of the tests.

This regexps are created to be rather forgiving.  For example, the function
will not choke if two spaces were included where the "spec" (such as it is)
expects one.  Obviously this is because for CN splitting purposes, it doesn't
matter, we're not going to ever split in the middle of whitespace.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-04-03 18:47:48 -05:00
Joshua Ferraro
69c74c06ae Move Amazon.pm to External/ directory
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-03-27 17:23:49 -05:00
Joe Atzberger
a3ae0a5628 Test for LCCN splitting.
This test establishes what LCCN splitting is required to do
to be considered successful.  See Bug 2691.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-03-11 08:37:27 -05:00
Joe Atzberger
abe306c2df Allow LDAP test to bail if LDAP disabled.
Also added more feedback and the ability to override KOHA_CONF
"useldapserver" value with ENV variable KOHA_USELDAPSERVER.

This patch should be considered for inclusion to 3.0 stable branch
because it prevents unnecessary failure of test battery.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-03-05 09:49:10 -06:00
John Beppu
ed3c0545da Tests for New Modules
- KohaTest::Category
- KohaTest::ItemCirculationAlertPreference
- KohaTest::ItemType
- KohaTest::Message

Signed-off-by: Daniel Sweeney <daniel.sweeney@liblime.com>
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-02-04 13:58:22 -06:00
Joe Atzberger
a581f7203c Bug 2842: ->regexp('syspref') failed for users of iso dateformat.
Sticky due date and patron import were the two areas affected.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-01-06 20:24:46 -06:00
Joe Atzberger
4e50585926 Dates expanding to expose some time (HH:MM:SS) granularity.
t/Dates.t is essentially restored from its previous state with
the revision that it now does not use C4::Context or check syspref
for the default date format.  Instead it sets the C4::Dates default
directly, taking cue from command line argument or ENV.  ISO format
revised to accept "T" separator and "Z" (zulu) terminator. POD
expanded and corrected.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-01-06 20:24:40 -06:00
Andrew Moore
0b1c856e4b Bug 2505: adding warnings to C4/Biblio.pm
I added 'use warnings' to C4::Biblio and made a handful of changes to
reduce the number of warnings emitted.

One notable spot is the change in the regex in
C4::Biblio::GetNoZebraIndexes. I have replaced the parens with a character
class. The parens change the way 'split' works, making it return elements
for each delimiter. We did not want those elements returned, and they
only resulted in "'' => undef" being added to the final hash. They also
resulted in two "undefined" warnings for each pass through the loop. I've
included a simple test for this function.

There may be a few warnings still emitted in spots, but either I haven't
seen them yet, or I have chosen to not fix them yet because they require
too much change.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-01-05 16:16:38 -06:00
Joe Atzberger
9dbd65da27 barcodedecode() did not always return barcode
This patch amends the function to return barcode, in particular when
filter is not defined.  It also adds an optional 2nd argument to
allow the filter to be specified by caller, enabling testing.

Non-DB-dependent test script included.  Note: T-prefix style
barcode filter is not documented, and drops the first nonzero
digit after the T.  This seems mistaken, but is not corrected here
to avoid any surprises.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-01-05 15:55:14 -06:00
Allen Reinmeyer
3fca370fba Test suite: C4::Members::GetMemberDetails
Tests for C4::Members::GetMemberDetails.  Validates both calls
using either borrowernumber or cardnumber.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2008-12-29 13:01:06 -06:00
Allen Reinmeyer
bcf4246dae Test suite: C4::Members::GetMember
Tests the functionality of C4::Members::GetMember.  Tests exist
for every way that GetMember could be called on to search for an
existing member.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2008-12-29 13:01:05 -06:00
Andrew Moore
69a2b414ae test suite: C4::ImportBatch
Here are some tests for functions in C4::ImportBatch.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2008-12-22 11:43:07 -06:00
Andrew Moore
db8cfa37e3 bug 2824: improving error messages from test suite errors
This patch adds two warning messages to places in the test suite that
may fail. I don't think it changes any functionality, but it sure makes
it easier to figure out what has gone wrong.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2008-12-17 09:12:17 -06:00
Galen Charlton
45214cb1d5 add calls to clear_syspref_cache()
temporary until mutator for sysprefs created

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2008-12-11 09:49:13 -06:00
Galen Charlton
5f18793461 bug 2758: don't confirm checkout if fine balance is 0
Fixes problem where if the IssuingInProcess preference is ON,
the operator is always required to confirm a checkout if
the patron has had any fine transactions at all, even if
the patron's balance is 0.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2008-12-02 16:44:20 -06:00
Galen Charlton
da13a339bb moved Test_CSV_Various.t to xt/author
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2008-11-17 10:19:43 -06:00