+
+subtest 'SendQueuedMessages' => sub {
+ plan tests => 1;
+ t::lib::Mocks::mock_preference( 'SMSSendDriver', 'Email' );
+ my $patron = Koha::Patrons->find($borrowernumber);
+ $dbh->do(q|
+ INSERT INTO message_queue(borrowernumber, subject, content, message_transport_type, status, letter_code)
+ VALUES (?, 'subject', 'content', 'sms', 'pending', 'just_a_code')
+ |, undef, $borrowernumber
+ );
+ eval { C4::Letters::SendQueuedMessages(); };
+ is( $@, '', 'SendQueuedMessages should not explode if the patron does not have a sms provider set' );
+};