Bugzilla – Attachment 114415 Details for
Bug 15969
Allow use of Template Toolkit syntax for Phone Notices
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 15969 - Unit test use of __MESSAGE_ID__
Bug-15969---Unit-test-use-of-MESSAGEID.patch (text/plain), 2.23 KB, created by
Kyle M Hall (khall)
on 2020-12-15 18:15:25 UTC
(
hide
)
Description:
Bug 15969 - Unit test use of __MESSAGE_ID__
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2020-12-15 18:15:25 UTC
Size:
2.23 KB
patch
obsolete
>From 26b468933ba9c2a594b265495531a64d7643a1d6 Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Fri, 2 Dec 2016 16:16:30 +0000 >Subject: [PATCH] Bug 15969 - Unit test use of __MESSAGE_ID__ > >Signed-off-by: Nick Clemens <nick@bywatersolutions.com> >--- > t/db_dependent/Letters.t | 7 ++++--- > 1 file changed, 4 insertions(+), 3 deletions(-) > >diff --git a/t/db_dependent/Letters.t b/t/db_dependent/Letters.t >index 613f5696d3..c3c7df725b 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 => 83; >+use Test::More tests => 84; > use Test::MockModule; > use Test::Warn; > >@@ -116,7 +116,7 @@ is( $message_id, undef, 'EnqueueLetter without the letter argument returns undef > > delete $my_message->{message_transport_type}; > $my_message->{letter} = { >- content => 'I ⥠Koha', >+ content => 'I ⥠Koha:__MESSAGE_ID__', > title => 'å¤é is great', > metadata => 'metadata', > code => 'TEST_MESSAGE', >@@ -140,7 +140,8 @@ is( @$messages, 1, 'one message stored for the borrower' ); > is( $messages->[0]->{message_id}, $message_id, 'EnqueueLetter returns the message id correctly' ); > is( $messages->[0]->{borrowernumber}, $borrowernumber, 'EnqueueLetter stores the borrower number correctly' ); > is( $messages->[0]->{subject}, $my_message->{letter}->{title}, 'EnqueueLetter stores the subject correctly' ); >-is( $messages->[0]->{content}, $my_message->{letter}->{content}, 'EnqueueLetter stores the content correctly' ); >+is( @{[ split( /:/, $messages->[0]->{content} ) ]}[0], @{[ split( /:/, $my_message->{letter}->{content} ) ]}[0], 'EnqueueLetter stores the content correctly' ); >+ok( @{[ split( /:/, $messages->[0]->{content} ) ]}[1] =~ /^\d+$/, 'Content __MESSAGE_ID__ is replaced with an actual integer id' ); > is( $messages->[0]->{message_transport_type}, $my_message->{message_transport_type}, 'EnqueueLetter stores the message type correctly' ); > 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' ); >-- >2.24.1 (Apple Git-126)
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 15969
:
48618
|
48811
|
55819
|
55820
|
57931
|
57933
|
57934
|
57935
|
59923
|
59924
|
59925
|
59926
|
59937
|
59940
|
59941
|
59942
|
59943
|
59944
|
59945
|
59962
|
59963
|
59964
|
59965
|
71141
|
71142
|
71143
|
71144
|
103181
|
103182
|
103183
|
103184
|
114413
|
114414
|
114415
|
114416
|
118207
|
118208
|
118209
|
118210