Bugzilla – Attachment 75595 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.27 KB, created by
Tomás Cohen Arazi (tcohen)
on 2018-05-28 15:17:10 UTC
(
hide
)
Description:
Bug 20825: Add regression tests
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2018-05-28 15:17:10 UTC
Size:
2.27 KB
patch
obsolete
>From 386dc6982393122809bab0b0aab1cfe9361c7f40 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> >--- > 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 e93b019c5b..e053350638 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.17.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 20825
:
75575
|
75576
|
75578
|
75579
|
75580
|
75591
|
75592
|
75595
|
75596
|
75605
|
75606
|
75607
|
75608
|
75639