Bugzilla – Attachment 63984 Details for
Bug 18478
Some notices sent via SMS gateway fail
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[16.11.x rebase] Bug 18478 - Unit tests
1611x-rebase-Bug-18478---Unit-tests.patch (text/plain), 2.14 KB, created by
Nick Clemens (kidclamp)
on 2017-06-05 18:45:05 UTC
(
hide
)
Description:
[16.11.x rebase] Bug 18478 - Unit tests
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2017-06-05 18:45:05 UTC
Size:
2.14 KB
patch
obsolete
>From 9da21707c6e5cc51feabc4f1ec671f2a3e85cf57 Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Wed, 17 May 2017 12:58:09 -0400 >Subject: [PATCH] [16.11.x rebase] Bug 18478 - Unit tests > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > t/db_dependent/Letters.t | 16 ++++++++++++++-- > 1 file changed, 14 insertions(+), 2 deletions(-) > >diff --git a/t/db_dependent/Letters.t b/t/db_dependent/Letters.t >index 88ff567..326227f 100644 >--- a/t/db_dependent/Letters.t >+++ b/t/db_dependent/Letters.t >@@ -91,7 +91,7 @@ is( C4::Letters::EnqueueLetter(), undef, 'EnqueueLetter without argument returns > my $my_message = { > borrowernumber => $borrowernumber, > message_transport_type => 'sms', >- to_address => 'to@example.com', >+ to_address => undef, > from_address => 'from@example.com', > }; > my $message_id = C4::Letters::EnqueueLetter($my_message); >@@ -493,7 +493,8 @@ is($mail{'Message'}, 'Silence in the library,'.$subscriptionid.',No. 0', 'Serial > } > > subtest 'SendQueuedMessages' => sub { >- plan tests => 1; >+ >+ plan tests => 2; > t::lib::Mocks::mock_preference( 'SMSSendDriver', 'Email' ); > my $patron = Koha::Patrons->find($borrowernumber); > $dbh->do(q| >@@ -503,4 +504,15 @@ subtest 'SendQueuedMessages' => sub { > ); > eval { C4::Letters::SendQueuedMessages(); }; > is( $@, '', 'SendQueuedMessages should not explode if the patron does not have a sms provider set' ); >+ >+ my $sms_pro = $builder->build({ source => 'SmsProvider', value => { domain => 'kidclamp.rocks' } }); >+ ModMember( borrowernumber => $borrowernumber, smsalertnumber => '5555555555', sms_provider_id => $sms_pro->{id} ); >+ $message_id = C4::Letters::EnqueueLetter($my_message); #using datas set around line 95 and forward >+ C4::Letters::SendQueuedMessages(); >+ my $sms_message_address = $schema->resultset('MessageQueue')->search({ >+ borrowernumber => $borrowernumber, >+ status => 'sent' >+ })->next()->to_address(); >+ is( $sms_message_address, '5555555555@kidclamp.rocks', 'SendQueuedMessages populates the to address correctly for SMS by email' ); >+ > }; >-- >2.1.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 18478
:
63487
|
63488
|
63504
|
63505
|
63506
|
63674
|
63675
|
63734
|
63735
|
63736
|
63737
|
63738
|
63983
| 63984 |
63985