View | Details | Raw Unified | Return to bug 33260
Collapse All | Expand All

(-)a/Koha/Notice/Message.pm (+16 lines)
Lines 154-159 sub stylesheets { Link Here
154
    return $stylesheets;
154
    return $stylesheets;
155
}
155
}
156
156
157
=head3 patron
158
159
    my $patron = $message->patron;
160
161
Returns the Koha::Patron object for the recipient of the queued message
162
163
=cut
164
165
sub patron {
166
    my ($self) = @_;
167
168
    $self->{_patron} ||= Koha::Patrons->find( $self->borrowernumber );
169
170
    return $self->{_patron};
171
}
172
157
=head3 type
173
=head3 type
158
174
159
=cut
175
=cut
(-)a/t/db_dependent/Letters.t (-3 / +4 lines)
Lines 170-177 is( Link Here
170
is( $messages->[0]->{failure_code}, '', 'Failure code for successful message correctly empty' );
170
is( $messages->[0]->{failure_code}, '', 'Failure code for successful message correctly empty' );
171
171
172
# Setting time_queued to something else than now
172
# Setting time_queued to something else than now
173
my $yesterday = dt_from_string->subtract( days => 1 );
173
my $yesterday   = dt_from_string->subtract( days => 1 );
174
Koha::Notice::Messages->find( $messages->[0]->{message_id} )->time_queued($yesterday)->store;
174
my $message_obj = Koha::Notice::Messages->find( $messages->[0]->{message_id} )->time_queued($yesterday)->store;
175
my $patron_obj  = Koha::Patrons->find($borrowernumber);
176
is_deeply( $message_obj->patron, $patron_obj, "Koha::Notice::Message->patron sub correctly returns patron object" );
175
177
176
# EnqueueLetter - Test characters limitation for SMS
178
# EnqueueLetter - Test characters limitation for SMS
177
$my_message->{letter}->{content} = "a" x 2000;
179
$my_message->{letter}->{content} = "a" x 2000;
178
- 

Return to bug 33260