Bugzilla – Attachment 113581 Details for
Bug 23463
Move C4::Items CRUD subroutines to Koha::Item
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 26948: Regression tests
Bug-26948-Regression-tests.patch (text/plain), 2.55 KB, created by
Blou
on 2020-11-12 20:26:03 UTC
(
hide
)
Description:
Bug 26948: Regression tests
Filename:
MIME Type:
Creator:
Blou
Created:
2020-11-12 20:26:03 UTC
Size:
2.55 KB
patch
obsolete
>From 6c688445c2530321a6f621cf626ce7d1120e7401 Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Thu, 12 Nov 2020 13:36:00 +0000 >Subject: [PATCH] Bug 26948: Regression tests > >We already mock the send_or_die method from Email::Stuffer; This patch >updates that mock to extract the internal representation of the email >encoded message and looks for a known double encoded representation of a >character in the sample body. > >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> > >Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Signed-off-by: Blou <blou@inlibro.com> > >https://bugs.koha-community.org/show_bug.cgi?id=23463 >--- > t/db_dependent/Letters.t | 14 +++++++++----- > 1 file changed, 9 insertions(+), 5 deletions(-) > >diff --git a/t/db_dependent/Letters.t b/t/db_dependent/Letters.t >index 766e21d7f4..88dfec8b1d 100755 >--- a/t/db_dependent/Letters.t >+++ b/t/db_dependent/Letters.t >@@ -18,12 +18,14 @@ > # along with Koha; if not, see <http://www.gnu.org/licenses>. > > use Modern::Perl; >-use Test::More tests => 73; >+use Test::More tests => 77; > use Test::MockModule; > use Test::Warn; > > use MARC::Record; > >+use utf8; >+ > my ( $email_object, $sendmail_params ); > > my $email_sender_module = Test::MockModule->new('Email::Stuffer'); >@@ -31,6 +33,8 @@ $email_sender_module->mock( > 'send_or_die', > sub { > ( $email_object, $sendmail_params ) = @_; >+ my $str = $email_object->email->as_string; >+ unlike $str, qr/I =C3=A2=C2=99=C2=A5 Koha=/, "Content is not double encoded"; > warn "Fake send_or_die"; > } > ); >@@ -110,8 +114,8 @@ is( $message_id, undef, 'EnqueueLetter without the letter argument returns undef > > delete $my_message->{message_transport_type}; > $my_message->{letter} = { >- content => 'a message', >- title => 'message title', >+ content => 'I ⥠Koha', >+ title => 'å¤é is great', > metadata => 'metadata', > code => 'TEST_MESSAGE', > content_type => 'text/plain', >@@ -534,7 +538,7 @@ is($email_object->email->header('To'), 'robert.tables@mail.com', "mailto address > t::lib::Mocks::mock_preference( 'SendAllEmailsTo', '' ); > > subtest 'SendAlerts - claimissue' => sub { >- plan tests => 9; >+ plan tests => 11; > > use C4::Serials; > >@@ -749,7 +753,7 @@ subtest 'TranslateNotices' => sub { > > subtest 'SendQueuedMessages' => sub { > >- plan tests => 9; >+ plan tests => 12; > > t::lib::Mocks::mock_preference( 'SMSSendDriver', 'Email' ); > t::lib::Mocks::mock_preference('EmailSMSSendDriverFromAddress', ''); >-- >2.17.1
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 23463
:
95899
|
95900
|
95901
|
95902
|
95903
|
95904
|
95905
|
95906
|
95907
|
95908
|
95909
|
95910
|
95911
|
95912
|
95913
|
95914
|
95915
|
95916
|
95917
|
95918
|
95919
|
95920
|
95921
|
95922
|
95923
|
95925
|
96145
|
97895
|
97896
|
97897
|
97898
|
97899
|
97900
|
97901
|
97902
|
97903
|
97904
|
97905
|
97906
|
97907
|
97908
|
97909
|
97910
|
97911
|
97912
|
97913
|
97914
|
97915
|
97916
|
97917
|
97918
|
97919
|
97920
|
97921
|
101151
|
101152
|
101153
|
101154
|
101156
|
101157
|
101158
|
101161
|
101163
|
101165
|
101167
|
101169
|
101170
|
101171
|
101172
|
101173
|
101174
|
101175
|
101176
|
101177
|
101178
|
101179
|
101180
|
101181
|
101182
|
101183
|
101184
|
101185
|
101186
|
101188
|
101189
|
101190
|
101191
|
101192
|
101193
|
101194
|
101195
|
101196
|
101197
|
101246
|
101247
|
101248
|
101249
|
101250
|
101251
|
101252
|
101253
|
101254
|
101255
|
101256
|
101257
|
101258
|
101259
|
101260
|
101261
|
101262
|
101263
|
101264
|
101265
|
101266
|
101267
|
101268
|
101269
|
101270
|
101271
|
101272
|
101273
|
101274
|
101275
|
101276
|
101277
|
101278
|
101279
|
101280
|
101281
|
101282
|
101283
|
101284
|
101413
|
101414
|
101415
|
101416
|
101432
|
101476
|
102071
|
103129
|
113581