]> git.koha-community.org Git - koha.git/commit
Bug 9209 - Mocked Koha::Calendar tests
authorTomas Cohen Arazi <tomascohen@gmail.com>
Tue, 4 Dec 2012 18:14:59 +0000 (15:14 -0300)
committerChris Cormack <chris@bigballofwax.co.nz>
Tue, 1 Jan 2013 18:23:30 +0000 (07:23 +1300)
commit43f7db894b354f2c85d9f19a91a57f83cd88aa4a
tree5d15f6df0fae558fde7aee811410e2a0f6a21e01
parent05ff289a3de9426569a12c330d66e91816d1f537
Bug 9209 - Mocked Koha::Calendar tests

Using specific method for populating the internal data structures from Koha::Calendar
has yielded to the non-detection of several bugs. There are also several tests that where
db_dependent which is not always desirable.

I propose the use of DBD::Mock (::Session) for using the actual code used by Koha in production
for testing, mocking the DB queries itselves.

I also took the time to repeat several tests in different syspref configurations (they applied
only to daysMode=Calendar, and now cover all confs).

Notes:
- I used DBD:Mock 1.45 as previous version (1.43, from 12.04) was broken
- Some tests revealed a bug on days_between as I see it... reporting as Bug #9211

Sponsored-by: Universidad Nacional de Córdoba
Signed-off-by: Elliott Davis <elliott@bywatersolutions.com>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Koha/Calendar.pm
t/Calendar.t