Bug 17579: Make sure we are testing the real life
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Wed, 9 Nov 2016 13:23:54 +0000 (13:23 +0000)
committerKyle M Hall <kyle@bywatersolutions.com>
Tue, 15 Nov 2016 15:24:51 +0000 (15:24 +0000)
commitea3704203e88382024837c5caa2c264a153a3cf0
tree4a68d18c4fe2533db8671199a1fb6989d34ef8f4
parentd892342e6f8569a4ea51a0e550b5d9c59b92e588
Bug 17579: Make sure we are testing the real life

Without this patch, the tests are not testing the same things as what
happens on the interface.
We need to refresh the object to make sure the date set into dateexpiry
is the one in DB.
Without this patch, ->is_expired test a datetime object, with this patch
it compares with a date oject

Without the changes made in Koha::Patron->is_expired, a patron which has
a dateexpiry set to today was marked as expired on the interface. This
is a change in the behavior, what this refactoring does not want to do.

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Koha/Patron.pm
t/db_dependent/Koha/Patrons.t