use Modern::Perl;
use DateTime::Duration;
-use Test::More tests => 103;
+use Test::More tests => 104;
use Test::Warn;
use t::lib::Mocks;
is( CountSuggestion('CHECKED'), 1, 'CountSuggestion returns the correct number of suggestions' );
+$mod_suggestion4->{manageddate} = 'invalid date!';
+ModSuggestion($mod_suggestion4);
+$messages = C4::Letters::GetQueuedMessages({
+ borrowernumber => $borrowernumber2
+});
+is (scalar(@$messages), 1, 'No new letter should have been generated if the update raised an error');
+
is( GetSuggestionInfo(), undef, 'GetSuggestionInfo without the suggestion id returns undef' );
$suggestion = GetSuggestionInfo($my_suggestionid);
is( $suggestion->{suggestionid}, $my_suggestionid, 'GetSuggestionInfo returns the suggestion id correctly' );