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

(-)a/t/db_dependent/Letters.t (-6 / +5 lines)
Lines 957-963 subtest 'Test SMS handling in SendQueuedMessages' => sub { Link Here
957
957
958
subtest 'Test guarantor handling in SendQueuedMessages' => sub {
958
subtest 'Test guarantor handling in SendQueuedMessages' => sub {
959
959
960
    plan tests => 8;
960
    plan tests => 7;
961
961
962
    t::lib::Mocks::mock_preference( 'borrowerRelationship', 'test' );
962
    t::lib::Mocks::mock_preference( 'borrowerRelationship', 'test' );
963
963
Lines 1012-1029 subtest 'Test guarantor handling in SendQueuedMessages' => sub { Link Here
1012
    is( $email_object->email->header('Cc'), $guarantor2->email, "cc correctly uses second guarantor" );
1012
    is( $email_object->email->header('Cc'), $guarantor2->email, "cc correctly uses second guarantor" );
1013
1013
1014
    # feature disabled
1014
    # feature disabled
1015
    t::lib::Mocks::mock_preference( 'RedirectGuaranteeEmail', '0' ); #FIXME: This mock is failing!?
1015
    t::lib::Mocks::mock_preference( 'RedirectGuaranteeEmail', '0' );
1016
1016
1017
    # reset message
1017
    # reset message
1018
    $schema->resultset('MessageQueue')->search( { borrowernumber => $borrowernumber, status => 'sent' } )
1018
    Koha::Notice::Messages->find($message_id)->delete;
1019
        ->update( { status => 'pending', failure_code => undef } );
1020
1019
1020
    $message_id = C4::Letters::EnqueueLetter($my_message);
1021
    warning_like { C4::Letters::SendQueuedMessages(); }
1021
    warning_like { C4::Letters::SendQueuedMessages(); }
1022
    qr|No 'to_address', email address or guarantors email address for borrowernumber|,
1022
    qr|No 'to_address', email address or guarantors email address for borrowernumber|,
1023
        "SendQueuedMessages fails when no to_address, patron notice email and RedirectGuaranteeEmail is not set";
1023
        "SendQueuedMessages fails when no to_address, patron notice email and RedirectGuaranteeEmail is not set";
1024
1024
1025
    # clear borrower queue
1025
    # clear borrower queue
1026
    $schema->resultset('MessageQueue')->search( { borrowernumber => $borrowernumber, status => 'sent' } )->delete();
1026
    Koha::Notice::Messages->find($message_id)->delete;
1027
};
1027
};
1028
1028
1029
subtest 'get_item_content' => sub {
1029
subtest 'get_item_content' => sub {
1030
- 

Return to bug 12532