Lines 250-261
$messages = C4::Letters::GetQueuedMessages({
Link Here
|
250 |
}); |
250 |
}); |
251 |
is ($messages->[0]->{message_transport_type}, 'email', 'When FallbackToSMSIfNoEmail syspref is enabled the suggestion message_transport_type is email if the borrower has an email'); |
251 |
is ($messages->[0]->{message_transport_type}, 'email', 'When FallbackToSMSIfNoEmail syspref is enabled the suggestion message_transport_type is email if the borrower has an email'); |
252 |
|
252 |
|
253 |
$mod_suggestion4->{manageddate} = 'invalid date!'; |
253 |
{ |
254 |
ModSuggestion($mod_suggestion4); |
254 |
# Hiding the expected warning displayed by DBI |
255 |
$messages = C4::Letters::GetQueuedMessages({ |
255 |
# DBD::mysql::st execute failed: Incorrect date value: 'invalid date!' for column 'manageddate' |
256 |
borrowernumber => $borrowernumber2 |
256 |
my $stderr; |
257 |
}); |
257 |
local *STDERR; |
258 |
is (scalar(@$messages), 1, 'No new letter should have been generated if the update raised an error'); |
258 |
open STDERR, '>', '/dev/null'; |
|
|
259 |
|
260 |
$mod_suggestion4->{manageddate} = 'invalid date!'; |
261 |
ModSuggestion($mod_suggestion4); |
262 |
$messages = C4::Letters::GetQueuedMessages({ |
263 |
borrowernumber => $borrowernumber2 |
264 |
}); |
265 |
|
266 |
close STDERR; |
267 |
is (scalar(@$messages), 1, 'No new letter should have been generated if the update raised an error'); |
268 |
} |
259 |
|
269 |
|
260 |
is( GetSuggestionInfo(), undef, 'GetSuggestionInfo without the suggestion id returns undef' ); |
270 |
is( GetSuggestionInfo(), undef, 'GetSuggestionInfo without the suggestion id returns undef' ); |
261 |
$suggestion = GetSuggestionInfo($my_suggestionid); |
271 |
$suggestion = GetSuggestionInfo($my_suggestionid); |
262 |
- |
|
|