Bugzilla – Attachment 97669 Details for
Bug 24441
Error when checking in an item with BranchTansferLimitsType set to itemtype
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 24441: Add tests
Bug-24441-Add-tests.patch (text/plain), 2.17 KB, created by
Jonathan Druart
on 2020-01-21 15:08:51 UTC
(
hide
)
Description:
Bug 24441: Add tests
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2020-01-21 15:08:51 UTC
Size:
2.17 KB
patch
obsolete
>From 66d8338eb18118ab3ec00e1194a6f73b5e81faf6 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Tue, 21 Jan 2020 16:08:12 +0100 >Subject: [PATCH] Bug 24441: Add tests > >--- > t/db_dependent/Circulation/Returns.t | 32 +++++++++++++++++++++++++++++++- > 1 file changed, 31 insertions(+), 1 deletion(-) > >diff --git a/t/db_dependent/Circulation/Returns.t b/t/db_dependent/Circulation/Returns.t >index 25ce71849c..5def587366 100644 >--- a/t/db_dependent/Circulation/Returns.t >+++ b/t/db_dependent/Circulation/Returns.t >@@ -17,7 +17,7 @@ > > use Modern::Perl; > >-use Test::More tests => 5; >+use Test::More tests => 6; > use Test::MockModule; > use Test::Warn; > >@@ -364,4 +364,34 @@ subtest 'Checkin of an item claimed as returned should generate a message' => su > ok( $messages->{ReturnClaims}, "ReturnClaims is in messages for return of a claimed as returned itm" ); > }; > >+subtest 'BranchTransferLimitsType' => sub { >+ plan tests => 2; >+ >+ t::lib::Mocks::mock_preference('AutomaticItemReturn', 0); >+ t::lib::Mocks::mock_preference('UseBranchTransferLimits', 1); >+ t::lib::Mocks::mock_preference('BranchTransferLimitsType', 'ccode'); >+ >+ my $biblio = $builder->build_object( { class => 'Koha::Biblios' } ); >+ my $item = $builder->build_object( >+ { >+ class => 'Koha::Items', >+ value => { >+ biblionumber => $biblio->biblionumber, >+ notforloan => 0, >+ itemlost => 0, >+ withdrawn => 0, >+ } >+ } >+ ); >+ my $patron = $builder->build_object({class => 'Koha::Patrons'}); >+ my $checkout = AddIssue( $patron->unblessed, $item->barcode ); >+ my ( $doreturn, $messages, $issue ) = AddReturn($item->barcode); >+ is( $doreturn, 1, 'AddReturn should have checkin the item if BranchTransferLimitsType=ccode'); >+ >+ t::lib::Mocks::mock_preference('BranchTransferLimitsType', 'itemtype'); >+ $checkout = AddIssue( $patron->unblessed, $item->barcode ); >+ ( $doreturn, $messages, $issue ) = AddReturn($item->barcode); >+ is( $doreturn, 1, 'AddReturn should have checkin the item if BranchTransferLimitsType=itemtype'); >+}; >+ > $schema->storage->txn_rollback; >-- >2.11.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 24441
:
97469
|
97513
| 97669 |
97670