Bugzilla – Attachment 75607 Details for
Bug 20825
Cannot checkout if item types at biblio level
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 20825: Add regression tests
Bug-20825-Add-regression-tests.patch (text/plain), 2.32 KB, created by
Katrin Fischer
on 2018-05-28 20:08:38 UTC
(
hide
)
Description:
Bug 20825: Add regression tests
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2018-05-28 20:08:38 UTC
Size:
2.32 KB
patch
obsolete
>From 56edd4ad0ed5bfb2b5ec92b1612fe98725a813dd Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Mon, 28 May 2018 11:20:32 -0300 >Subject: [PATCH] Bug 20825: Add regression tests > >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> > >Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> >--- > t/db_dependent/Circulation.t | 36 +++++++++++++++++++++++++++++++++++- > 1 file changed, 35 insertions(+), 1 deletion(-) > >diff --git a/t/db_dependent/Circulation.t b/t/db_dependent/Circulation.t >index e93b019..e053350 100755 >--- a/t/db_dependent/Circulation.t >+++ b/t/db_dependent/Circulation.t >@@ -17,7 +17,7 @@ > > use Modern::Perl; > >-use Test::More tests => 116; >+use Test::More tests => 117; > > use DateTime; > use POSIX qw( floor ); >@@ -2192,6 +2192,40 @@ subtest 'CanBookBeIssued | is_overdue' => sub { > > }; > >+subtest 'CanBookBeIssued | item-level_itypes=biblio' => sub { >+ plan tests => 2; >+ >+ t::lib::Mocks::mock_preference('item-level_itypes', 0); # biblio >+ my $library = $builder->build( { source => 'Branch' } ); >+ my $patron = $builder->build_object( { class => 'Koha::Patrons', value => { categorycode => $patron_category->{categorycode} } } )->store; >+ >+ my $itemtype = $builder->build( >+ { >+ source => 'Itemtype', >+ value => { notforloan => undef, } >+ } >+ ); >+ >+ my $biblioitem = $builder->build( { source => 'Biblioitem', value => { itemtype => $itemtype->{itemtype} } } ); >+ my $item = $builder->build_object( >+ { >+ class => 'Koha::Items', >+ value => { >+ homebranch => $library->{branchcode}, >+ holdingbranch => $library->{branchcode}, >+ notforloan => 0, >+ itemlost => 0, >+ withdrawn => 0, >+ biblionumber => $biblioitem->{biblionumber}, >+ biblioitemnumber => $biblioitem->{biblionumber}, >+ } >+ } >+ )->store; >+ >+ my ( $issuingimpossible, $needsconfirmation ) = CanBookBeIssued( $patron, $item->barcode, undef, undef, undef, undef ); >+ is_deeply( $needsconfirmation, {}, 'Item can be issued to this patron' ); >+ is_deeply( $issuingimpossible, {}, 'Item can be issued to this patron' ); >+}; > > $schema->storage->txn_rollback; > $cache->clear_from_cache('single_holidays'); >-- >2.1.4
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 20825
:
75575
|
75576
|
75578
|
75579
|
75580
|
75591
|
75592
|
75595
|
75596
|
75605
|
75606
| 75607 |
75608
|
75639