Bugzilla – Attachment 123669 Details for
Bug 28813
Fix recording and display of delivery errors for patron notices
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 28813: Update unit tests
Bug-28813-Update-unit-tests.patch (text/plain), 2.61 KB, created by
Katrin Fischer
on 2021-08-10 11:04:08 UTC
(
hide
)
Description:
Bug 28813: Update unit tests
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2021-08-10 11:04:08 UTC
Size:
2.61 KB
patch
obsolete
>From 2e0f9367018ada38381c82c4841bf4c2782b1ee0 Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Thu, 5 Aug 2021 10:16:24 +0100 >Subject: [PATCH] Bug 28813: Update unit tests > >This patch updates the unit tests to check for failure_code instead of >delivery_note and catches a missing case. > >Signed-off-by: David Nind <david@davidnind.com> > >Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> >--- > t/db_dependent/Letters.t | 13 ++++++++----- > 1 file changed, 8 insertions(+), 5 deletions(-) > >diff --git a/t/db_dependent/Letters.t b/t/db_dependent/Letters.t >index 7e5273fb02..4ba2105560 100755 >--- a/t/db_dependent/Letters.t >+++ b/t/db_dependent/Letters.t >@@ -18,7 +18,7 @@ > # along with Koha; if not, see <http://www.gnu.org/licenses>. > > use Modern::Perl; >-use Test::More tests => 82; >+use Test::More tests => 83; > use Test::MockModule; > use Test::Warn; > use Test::Exception; >@@ -146,7 +146,7 @@ is( $messages->[0]->{message_transport_type}, $my_message->{message_transport_ty > is( $messages->[0]->{status}, 'pending', 'EnqueueLetter stores the status pending correctly' ); > isnt( $messages->[0]->{time_queued}, undef, 'Time queued inserted by default in message_queue table' ); > is( $messages->[0]->{updated_on}, $messages->[0]->{time_queued}, 'Time status changed equals time queued when created in message_queue table' ); >-is( $messages->[0]->{delivery_note}, '', 'Delivery note for successful message correctly empty'); >+is( $messages->[0]->{failure_code}, '', 'Failure code for successful message correctly empty'); > > # Setting time_queued to something else than now > my $yesterday = dt_from_string->subtract( days => 1 ); >@@ -163,6 +163,11 @@ is( > 'failed', > 'message marked failed if tried to send SMS message for borrower with no smsalertnumber set (bug 11208)' > ); >+is( >+ $messages->[0]->{failure_code}, >+ 'MISSING_SMS', >+ 'Correct failure code set for borrower with no smsalertnumber set' >+); > isnt($messages->[0]->{updated_on}, $messages->[0]->{time_queued}, 'Time status changed differs from time queued when status changes' ); > is(dt_from_string($messages->[0]->{time_queued}), $yesterday, 'Time queued remaines inmutable' ); > >@@ -177,9 +182,7 @@ $resent = C4::Letters::ResendMessage(); > is( $resent, undef, 'ResendMessage should return undef if not message_id given' ); > > # Delivery notes >-is($messages->[0]->{delivery_note}, 'Missing SMS number', >- 'Delivery note for no smsalertnumber correctly set'); >- >+is( $messages->[0]->{failure_code}, 'MISSING_SMS', 'Failure code set correctly for no smsalertnumber correctly set' ); > > # GetLetters > my $letters = C4::Letters::GetLetters(); >-- >2.11.0
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 28813
:
123471
|
123472
|
123473
|
123474
|
123536
|
123537
|
123538
|
123539
|
123667
|
123668
| 123669 |
123670