Bugzilla – Attachment 153664 Details for
Bug 34258
Cannot renew item via SIP2
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 34258: update SIP-related unit test
Bug-34258-update-SIP-related-unit-test.patch (text/plain), 2.11 KB, created by
Martin Renvoize (ashimema)
on 2023-07-19 14:21:45 UTC
(
hide
)
Description:
Bug 34258: update SIP-related unit test
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2023-07-19 14:21:45 UTC
Size:
2.11 KB
patch
obsolete
>From 4d9c202a0bc21ee66773b380380715a98fa22428 Mon Sep 17 00:00:00 2001 >From: Andreas Roussos <a.roussos@dataly.gr> >Date: Thu, 13 Jul 2023 16:02:02 +0000 >Subject: [PATCH] Bug 34258: update SIP-related unit test > >Test plan: > >1) Run the updated SIP-related unit test *without* having applied > the other patch from this bug report -- it should fail: > > $ prove t/db_dependent/SIP/ILS.t > >2) Apply the patch that fixes C4/SIP/ILS/Transaction/Renew.pm > >3) Re-run the unit test -- it should pass. > >Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov> >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > t/db_dependent/SIP/ILS.t | 32 +++++++++++++++++++++++++++++++- > 1 file changed, 31 insertions(+), 1 deletion(-) > >diff --git a/t/db_dependent/SIP/ILS.t b/t/db_dependent/SIP/ILS.t >index e96dd4ce55..10f4d28f68 100755 >--- a/t/db_dependent/SIP/ILS.t >+++ b/t/db_dependent/SIP/ILS.t >@@ -20,7 +20,7 @@ > > use Modern::Perl; > >-use Test::More tests => 14; >+use Test::More tests => 15; > > use t::lib::TestBuilder; > use t::lib::Mocks; >@@ -315,4 +315,34 @@ subtest renew_all => sub { > isnt( $transaction->{screen_msg}, 'Invalid patron password.', "Empty password succeeds" ); > }; > >+subtest renew => sub { >+ plan tests => 2; >+ >+ my $library = $builder->build_object ({ class => 'Koha::Libraries' }); >+ my $patron = $builder->build_object( >+ { >+ class => 'Koha::Patrons', >+ value => { >+ branchcode => $library->branchcode, >+ } >+ } >+ ); >+ t::lib::Mocks::mock_userenv({ branchcode => $library->branchcode }); >+ >+ my $item = $builder->build_sample_item({ >+ library => $library->branchcode, >+ }); >+ >+ AddIssue( $patron->unblessed, $item->barcode, undef, 0 ); >+ my $checkout = $item->checkout; >+ ok( defined($checkout), "Successfully checked out an item prior to renewal"); >+ >+ my $ils = C4::SIP::ILS->new({ id => $library->branchcode }); >+ >+ my $transaction = $ils->renew( $patron->cardnumber, "", $item->barcode ); >+ >+ is( $transaction->{renewal_ok}, 1, "Renewal succeeded" ); >+ >+}; >+ > $schema->storage->txn_rollback; >-- >2.41.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 34258
:
153416
|
153417
|
153427
|
153428
|
153663
| 153664 |
153665