Bugzilla – Attachment 173715 Details for
Bug 37582
SIP2 responses can contain newlines when a patron has multiple debarments
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 37582: Add unit test
Bug-37582-Add-unit-test.patch (text/plain), 1.68 KB, created by
Kyle M Hall (khall)
on 2024-10-30 12:25:11 UTC
(
hide
)
Description:
Bug 37582: Add unit test
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2024-10-30 12:25:11 UTC
Size:
1.68 KB
patch
obsolete
>From 35e420c1cb7d586aa35854a0ec8576d03a8c9141 Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Wed, 30 Oct 2024 11:53:35 +0000 >Subject: [PATCH] Bug 37582: Add unit test > >--- > t/db_dependent/SIP/Message.t | 24 +++++++++++++++++++++++- > 1 file changed, 23 insertions(+), 1 deletion(-) > >diff --git a/t/db_dependent/SIP/Message.t b/t/db_dependent/SIP/Message.t >index 7975619b075..325d9361d44 100755 >--- a/t/db_dependent/SIP/Message.t >+++ b/t/db_dependent/SIP/Message.t >@@ -21,7 +21,7 @@ > # along with Koha; if not, see <http://www.gnu.org/licenses>. > > use Modern::Perl; >-use Test::More tests => 20; >+use Test::More tests => 21; > use Test::Exception; > use Test::MockObject; > use Test::MockModule; >@@ -1637,6 +1637,28 @@ sub test_renew_desensitize { > > } > >+subtest 'Test convert_nonprinting_characters' => sub { >+ >+ my $schema = Koha::Database->new->schema; >+ $schema->storage->txn_begin; >+ >+ plan tests => 1; >+ my $msg = >+ qq{64YYYY eng20241030 115433000000000000000000000000AOtDJZ8mxoq|AAF6LO825MxxosppnEpaUQ6a|AEnzsktrzn seoGzB|BLY|CQY|BHUSD|BV0|CC807485965|BDlbbGF5qo AawLbgu5W cD3r4q KVHWEkp KMAEKo en6QWEa5 Ho12sDL5hf|PB20241030|PCTQvaTv45|PIN|AFComment 1\nComment 2\nComment 3|BEZ2f_HGLMji|BFbbV3yXQ}; >+ my $server = { account => { convert_nonprinting_characters => ' -- ' } }; >+ >+ my $output; >+ { >+ local *STDOUT; >+ open STDOUT, '>', \$output; >+ C4::SIP::Sip::write_msg( undef, $msg, $server ) >+ } >+ >+ like( $output, qr/Comment 1 -- Comment 2 -- Comment 3/, "Response contains converted restriction comment" ); >+ >+ $schema->storage->txn_rollback; >+}; >+ > # Helper routines > > sub create_mocks { >-- >2.39.5 (Apple Git-154)
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 37582
:
171642
|
171643
|
171644
|
173081
|
173082
|
173306
|
173502
|
173503
|
173712
| 173715