Commit graph

9 commits

Author SHA1 Message Date
18b83eedd3 Bug 9142 - Remove the use of subtests
Debian stable's version of Test::More is older than the one I used on my
12.04 dev box, and doesn't support subtests, which I used to avoid side
effects between different test scenarios.

This patch removes that subtest definition.

Signed-off-by: Robin Sheat <robin@catalyst.net.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
All tests pass.
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
2012-11-28 07:19:34 -05:00
7b18e2146c Bug 8800 - useDaysMode=Datedue wrong behaviour (revisited)
useDaysMode=Datedue wasn't used as advertised in the docs. Added
next_open_day and prev_open_day subs to Koha::Calendar and some tests for them.

- Koha::Calendar->addDate was rewritten in a more sane way (also split into
  addHours and addDays for convenience).
- Fixed a bug introduced in Bug 8966 regarding dt truncation and dtSets->contains
- Minor docs typos
- Use the passed Calendar mode or default to 'Calendar' in Koha::Calendar->_mockinit.
- Tests

I'm writing some db-dependent tests for is_holiday, and hopefully for CalcDateDue so any
rewrite/followup doesn't break things.

Regards
To+

Sponsored-by: Universidad Nacional de Córdoba
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passed-QA-by: Paul Poulain <paul.poulain@biblibre.com>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
2012-11-22 09:11:19 -05:00
Maxime Pelletier
5c7fae8e89 Bug 8966 Koha::Calendar::is_holiday truncates the date
* Create a local copy of the date instead of calling truncate directly on the date
* Add a test to properly test that the issue is fixed

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-10-29 18:27:04 +01:00
Chris Cormack
d434be61e2 Bug 8486 - Follow up making the tests db independent
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Makes the test db independant by specifying the date format. Thus, there is no call to ->preference() that retrieve a systempreference
2012-08-01 12:36:56 +02:00
Paul Poulain
54f363c0a6 bug 8486 tiny follow-up, removing ` 2012-07-25 16:55:30 +02:00
Colin Campbell
cd44ef2dc9 Bug 8486 Merge Calendar test files
Moves the tests previously in t/Kalendar.t to t/Calendar.t
and removes the old file.
Note the existing minimal test of C4/Calendar still called in
t/Calendar

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-07-25 15:52:24 +02:00
Colin Campbell
3b694b9b1c Bug 8486 Correct calculation of days_between
Thee were errors in the calculation used for days_between
which caused incorrect values to be returned
Added tests to validate calculation

NB Tests still need to be provided for the hourly
calculations
2012-07-25 15:52:16 +02: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
rangi
77618f43cf Finishing up the last of the tests 2007-06-18 03:20:19 +00:00