Commit graph

11 commits

Author SHA1 Message Date
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
da82cb539a bug 2295 [1/4]: moving C4::Dates tests into database dependent tests
the t/Dates.t tests were actually databasase dependent. This patch replaces
t/Dates.t with t/lib/KohaTest/Dates/Usage.pm that relies on a database.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-07-07 16:32:27 -05:00
Andrew Moore
db755a4307 bug 2088: test suite refactoring to deal with t/override_context_prefs.pm
Some minor changes to get the test suite working a bit better:
I removed a superfluous method from t/lib/KohaTest.pm.
I made each barcode for the items added in KohaTest.pm unique so that they would actually get inserted.

Then, I removed t/override_context_prefs.pm. If you need that functionality, you're a database
dependent test and should be a module in t/lib.
So, I deleted all of the trivial .t tests that just 'use'd their modules and had no other
tests and replaced them with lib/KohaTest/*pm modules that do a little bit more checking
on those modules.
I removed the references to override_context_prefs.pm in all of the other .t modules.
They all pass now with no override_context_prefs.pm module.

The database_depenedent.pl test script still does not pass entirely. There's a problem with the zebra index
not being reset each time that the tables are truncated. I'll get to that.

no functional or documentation changes here.

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-05-11 06:48:40 -05:00
Joe Atzberger
b52e6430fc Dates - remove extra newlines from carps, add partial "00" date tests to Dates.t
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-01-14 16:45:31 -06:00
Galen Charlton
5290ec5596 test suite cleanup
Many of the tests were failing or putting warnings
because a valid systempreferences table is
usaully absent by the time 'make test' is run.

Fortunately, only a few modules try to invoke
C4::Context->preference during module initialization,
so added to the test suite override_context_prefs.pm,
which replaces preference() with a sub to return
testing values for three variables: 'dateformat',
'marcflavour', and 'LibraryName'.

Also fixed bug in t/Boolean.t

With this patch and the patch to move the DB-dependent
tests off to the side for the moment, 'make test'
now runs cleanly, at least on Debian.

Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-01-08 14:08:02 -06:00
Joe Atzberger
aa7a90738a Dates.pm - IMPORTANT fix for dmy_array (part of obejct, not class)
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2007-12-20 19:13:21 -06:00
Joe Atzberger
a1fe32d2f8 Total Test Overhaul! Most of these were stubs, and still are.
Input.t was replaced because it tested a now obsolete function.
Input.pm has that function commented out.
Several files were renamed to match their counterparts or
correct misspellingz.

Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2007-10-18 16:26:44 -05:00
Joe Atzberger
82f3a9423b Dates.pm: perl test to accompany Dates.pm functions.
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2007-10-17 07:01:06 -05:00
Joe Atzberger
bd76a1fb0f Context.pm fatalsToBrowser now dependent on $ENV{USER_AGENT}.
Minor adjustments to Dates.pm and associated test.  You should be able to run a
perl test that uses Context w/o getting fatalsToBrowser output.

Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2007-10-12 22:19:42 -05:00
Joe Atzberger
cd967a2db1 New object-oriented date module to soon replace Date.pm.
Also included is a traditional perl (t/Dates.t) test script.

Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2007-10-08 15:55:26 -05:00