Bugzilla – Attachment 63505 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]
Bug 18478 - Unit tests
Bug-18478---Unit-tests.patch (text/plain), 1.62 KB, created by
Nick Clemens (kidclamp)
on 2017-05-17 17:02:19 UTC
(
hide
)
Description:
Bug 18478 - Unit tests
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2017-05-17 17:02:19 UTC
Size:
1.62 KB
patch
obsolete
>From 600c4c69c357d2dd7087c505a5cdadc9a70770a7 Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Wed, 17 May 2017 12:58:09 -0400 >Subject: [PATCH] Bug 18478 - Unit tests > >--- > t/db_dependent/Letters.t | 12 +++++++++++- > 1 file changed, 11 insertions(+), 1 deletion(-) > >diff --git a/t/db_dependent/Letters.t b/t/db_dependent/Letters.t >index f3bb8bf..7950750 100644 >--- a/t/db_dependent/Letters.t >+++ b/t/db_dependent/Letters.t >@@ -606,7 +606,7 @@ subtest 'TranslateNotices' => sub { > > 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| >@@ -617,4 +617,14 @@ 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_object({ class => 'Koha::SMS::Providers', 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