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

(-)a/t/db_dependent/Suggestions.t (-2 / +8 lines)
Lines 18-24 Link Here
18
use Modern::Perl;
18
use Modern::Perl;
19
19
20
use DateTime::Duration;
20
use DateTime::Duration;
21
use Test::More tests => 109;
21
use Test::More tests => 110;
22
use Test::Warn;
22
use Test::Warn;
23
23
24
use t::lib::Mocks;
24
use t::lib::Mocks;
Lines 249-254 $messages = C4::Letters::GetQueuedMessages({ Link Here
249
});
249
});
250
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');
250
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
251
252
$mod_suggestion4->{manageddate} = 'invalid date!';
253
ModSuggestion($mod_suggestion4);
254
$messages = C4::Letters::GetQueuedMessages({
255
    borrowernumber => $borrowernumber2
256
});
257
is (scalar(@$messages), 1, 'No new letter should have been generated if the update raised an error');
258
252
is( GetSuggestionInfo(), undef, 'GetSuggestionInfo without the suggestion id returns undef' );
259
is( GetSuggestionInfo(), undef, 'GetSuggestionInfo without the suggestion id returns undef' );
253
$suggestion = GetSuggestionInfo($my_suggestionid);
260
$suggestion = GetSuggestionInfo($my_suggestionid);
254
is( $suggestion->{suggestionid}, $my_suggestionid, 'GetSuggestionInfo returns the suggestion id correctly' );
261
is( $suggestion->{suggestionid}, $my_suggestionid, 'GetSuggestionInfo returns the suggestion id correctly' );
255
- 

Return to bug 22908