|
Lines 18-24
Link Here
|
| 18 |
# along with Koha; if not, see <http://www.gnu.org/licenses>. |
18 |
# along with Koha; if not, see <http://www.gnu.org/licenses>. |
| 19 |
|
19 |
|
| 20 |
use Modern::Perl; |
20 |
use Modern::Perl; |
| 21 |
use Test::More tests => 100; |
21 |
use Test::More tests => 101; |
| 22 |
use Test::MockModule; |
22 |
use Test::MockModule; |
| 23 |
use Test::Warn; |
23 |
use Test::Warn; |
| 24 |
use Test::Exception; |
24 |
use Test::Exception; |
|
Lines 154-161
is( $messages->[0]->{updated_on}, $messages->[0]->{time_queued}, 'Time status ch
Link Here
|
| 154 |
is( $messages->[0]->{failure_code}, '', 'Failure code for successful message correctly empty'); |
154 |
is( $messages->[0]->{failure_code}, '', 'Failure code for successful message correctly empty'); |
| 155 |
|
155 |
|
| 156 |
# Setting time_queued to something else than now |
156 |
# Setting time_queued to something else than now |
| 157 |
my $yesterday = dt_from_string->subtract( days => 1 ); |
157 |
my $yesterday = dt_from_string->subtract( days => 1 ); |
| 158 |
Koha::Notice::Messages->find($messages->[0]->{message_id})->time_queued($yesterday)->store; |
158 |
my $message_obj = Koha::Notice::Messages->find( $messages->[0]->{message_id} )->time_queued($yesterday)->store; |
|
|
159 |
my $patron_obj = Koha::Patrons->find($borrowernumber); |
| 160 |
is_deeply( $message_obj->patron, $patron_obj, "Koha::Notice::Message->patron sub correctly returns patron object" ); |
| 159 |
|
161 |
|
| 160 |
# SendQueuedMessages |
162 |
# SendQueuedMessages |
| 161 |
|
163 |
|
| 162 |
- |
|
|