Bugzilla – Attachment 131244 Details for
Bug 29857
We must stringify our exceptions correctly
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 29857: (follow-up) Fix t/Koha/Email.t
Bug-29857-follow-up-Fix-tKohaEmailt.patch (text/plain), 3.67 KB, created by
Tomás Cohen Arazi
on 2022-03-02 12:57:55 UTC
(
hide
)
Description:
Bug 29857: (follow-up) Fix t/Koha/Email.t
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi
Created:
2022-03-02 12:57:55 UTC
Size:
3.67 KB
patch
obsolete
>From 8490f6c4e934d6427b22952a61efd3ef3b32dded Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Wed, 2 Mar 2022 09:55:32 -0300 >Subject: [PATCH] Bug 29857: (follow-up) Fix t/Koha/Email.t > >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> >--- > t/Koha/Email.t | 16 ++++++++-------- > 1 file changed, 8 insertions(+), 8 deletions(-) > >diff --git a/t/Koha/Email.t b/t/Koha/Email.t >index e89e807186..dbd17834ba 100755 >--- a/t/Koha/Email.t >+++ b/t/Koha/Email.t >@@ -107,7 +107,7 @@ subtest 'create() tests' => sub { > 'Koha::Exceptions::BadParameter', > 'Exception thrown correctly'; > >- is( "$@", q{Invalid 'from' parameter: not_an_email}, 'Exception message correct' ); >+ like( "$@", qr/Invalid 'from' parameter: not_an_email/, 'Exception message correct' ); > > t::lib::Mocks::mock_preference( 'KohaAdminEmailAddress', 'not_an_email' ); > >@@ -116,7 +116,7 @@ subtest 'create() tests' => sub { > 'Koha::Exceptions::BadParameter', > 'Exception thrown correctly'; > >- is( "$@", q{Invalid 'from' parameter: not_an_email}, 'Exception message correct' ); >+ like( "$@", qr/Invalid 'from' parameter: not_an_email/, 'Exception message correct' ); > > t::lib::Mocks::mock_preference( 'KohaAdminEmailAddress', 'tomasito@mail.com' ); > t::lib::Mocks::mock_preference( 'SendAllEmailsTo', undef ); >@@ -126,7 +126,7 @@ subtest 'create() tests' => sub { > 'Koha::Exceptions::BadParameter', > 'Exception thrown correctly'; > >- is( "$@", q{Invalid 'to' parameter: not_an_email}, 'Exception message correct' ); >+ like( "$@", qr/Invalid 'to' parameter: not_an_email/, 'Exception message correct' ); > > t::lib::Mocks::mock_preference( 'SendAllEmailsTo', 'not_an_email' ); > >@@ -135,7 +135,7 @@ subtest 'create() tests' => sub { > 'Koha::Exceptions::BadParameter', > 'Exception thrown correctly'; > >- is( "$@", q{Invalid 'to' parameter: not_an_email}, 'Exception message correct' ); >+ like( "$@", qr/Invalid 'to' parameter: not_an_email/, 'Exception message correct' ); > > t::lib::Mocks::mock_preference( 'SendAllEmailsTo', undef ); > >@@ -149,7 +149,7 @@ subtest 'create() tests' => sub { > 'Koha::Exceptions::BadParameter', > 'Exception thrown correctly'; > >- is( "$@", q{Invalid 'reply_to' parameter: not_an_email}, 'Exception message correct' ); >+ like( "$@", qr/Invalid 'reply_to' parameter: not_an_email/, 'Exception message correct' ); > > throws_ok > { Koha::Email->create( >@@ -161,7 +161,7 @@ subtest 'create() tests' => sub { > 'Koha::Exceptions::BadParameter', > 'Exception thrown correctly'; > >- is( "$@", q{Invalid 'sender' parameter: not_an_email}, 'Exception message correct' ); >+ like( "$@", qr/Invalid 'sender' parameter: not_an_email/, 'Exception message correct' ); > > throws_ok > { Koha::Email->create( >@@ -173,7 +173,7 @@ subtest 'create() tests' => sub { > 'Koha::Exceptions::BadParameter', > 'Exception thrown correctly'; > >- is( "$@", q{Invalid 'cc' parameter: not_an_email}, 'Exception message correct' ); >+ like( "$@", qr/Invalid 'cc' parameter: not_an_email/, 'Exception message correct' ); > > throws_ok > { Koha::Email->create( >@@ -185,7 +185,7 @@ subtest 'create() tests' => sub { > 'Koha::Exceptions::BadParameter', > 'Exception thrown correctly'; > >- is( "$@", q{Invalid 'bcc' parameter: not_an_email}, 'Exception message correct' ); >+ like( "$@", qr/Invalid 'bcc' parameter: not_an_email/, 'Exception message correct' ); > }; > }; > >-- >2.35.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 29857
:
129329
|
129330
|
130007
|
130008
|
130009
|
130010
|
130011
|
130012
|
130013
|
130014
|
130015
|
130156
|
130157
|
130158
|
130355
|
131112
|
131113
|
131114
|
131115
|
131116
|
131117
|
131232
|
131240
|
131241
|
131242
|
131243
| 131244 |
131256
|
131258
|
131287
|
131288
|
131289
|
131290
|
131291