Bugzilla – Attachment 106029 Details for
Bug 25805
SIP will show hold patron name (DA) as something like C4::SIP::SIPServer=HASH(0x88175c8) if there is no patron
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 25805: Regression tests
Bug-25805-Regression-tests.patch (text/plain), 2.09 KB, created by
Tomás Cohen Arazi (tcohen)
on 2020-06-18 19:58:58 UTC
(
hide
)
Description:
Bug 25805: Regression tests
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2020-06-18 19:58:58 UTC
Size:
2.09 KB
patch
obsolete
>From 845a15f80b56c8e64273d6557e1ffaf2e64603ee Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Thu, 18 Jun 2020 16:54:42 -0300 >Subject: [PATCH] Bug 25805: Regression tests > >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> >--- > t/db_dependent/SIP/Message.t | 37 +++++++++++++++++++++++++++++++++++- > 1 file changed, 36 insertions(+), 1 deletion(-) > >diff --git a/t/db_dependent/SIP/Message.t b/t/db_dependent/SIP/Message.t >index 75ecb7f3364..e3a81c54cdc 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 => 5; >+use Test::More tests => 6; > use Test::MockObject; > use Test::MockModule; > use Test::Warn; >@@ -82,6 +82,41 @@ subtest 'Test hold_patron_bcode' => sub { > $schema->storage->txn_rollback; > }; > >+subtest 'hold_patron_name() tests' => sub { >+ >+ plan tests => 2; >+ >+ my $schema = Koha::Database->new->schema; >+ $schema->storage->txn_begin; >+ >+ my $builder = t::lib::TestBuilder->new(); >+ >+ my $branchcode = $builder->build({ source => 'Branch' })->{branchcode}; >+ my ( $response, $findpatron ); >+ my $mocks = create_mocks( \$response, \$findpatron, \$branchcode ); >+ >+ my $item = $builder->build_sample_item( >+ { >+ damaged => 0, >+ withdrawn => 0, >+ itemlost => 0, >+ restricted => 0, >+ homebranch => $branchcode, >+ holdingbranch => $branchcode >+ } >+ ); >+ >+ my $server = { ils => $mocks->{ils} }; >+ my $sip_item = C4::SIP::ILS::Item->new( $item->barcode ); >+ >+ is( $sip_item->hold_patron_name, q{}, "SIP item with no hold returns empty string for patron name" ); >+ >+ my $resp .= C4::SIP::Sip::maybe_add( FID_CALL_NUMBER, $sip_item->hold_patron_name, $server ); >+ is( $resp, q{}, "maybe_add returns empty string for SIP item with no hold returns empty string" ); >+ >+ $schema->storage->txn_rollback; >+}; >+ > subtest 'Lastseen response' => sub { > > my $schema = Koha::Database->new->schema; >-- >2.27.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 25805
:
106009
|
106029
|
106030
|
106078
|
106079
|
106257