Bugzilla – Attachment 108977 Details for
Bug 25534
Add ability to specifying and store a reason when cancelling a hold
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 25534: Use build_sample_item in tests
Bug-25534-Use-buildsampleitem-in-tests.patch (text/plain), 2.53 KB, created by
Jonathan Druart
on 2020-08-24 09:52:01 UTC
(
hide
)
Description:
Bug 25534: Use build_sample_item in tests
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2020-08-24 09:52:01 UTC
Size:
2.53 KB
patch
obsolete
>From af5d9032babb4a7426057bc93df1f151cdd8e9c1 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Mon, 24 Aug 2020 11:31:20 +0200 >Subject: [PATCH] Bug 25534: Use build_sample_item in tests > >--- > t/db_dependent/Koha/Holds.t | 22 ++-------------------- > 1 file changed, 2 insertions(+), 20 deletions(-) > >diff --git a/t/db_dependent/Koha/Holds.t b/t/db_dependent/Koha/Holds.t >index 007c073e61..2282290329 100644 >--- a/t/db_dependent/Koha/Holds.t >+++ b/t/db_dependent/Koha/Holds.t >@@ -255,17 +255,8 @@ subtest 'cancel' => sub { > > subtest 'cancel with reason' => sub { > plan tests => 7; >- my $biblioitem = $builder->build_object( { class => 'Koha::Biblioitems' } ); > my $library = $builder->build_object( { class => 'Koha::Libraries' } ); >- my $itemtype = $builder->build_object( { class => 'Koha::ItemTypes', value => { rentalcharge => 0 } } ); >- my $item_info = { >- biblionumber => $biblioitem->biblionumber, >- biblioitemnumber => $biblioitem->biblioitemnumber, >- homebranch => $library->branchcode, >- holdingbranch => $library->branchcode, >- itype => $itemtype->itemtype, >- }; >- my $item = $builder->build_object( { class => 'Koha::Items', value => $item_info } ); >+ my $item = $builder->build_sample_item({ library => $library->branchcode }); > my $manager = $builder->build_object( { class => "Koha::Patrons" } ); > t::lib::Mocks::mock_userenv( { patron => $manager, branchcode => $manager->branchcode } ); > >@@ -322,17 +313,8 @@ subtest 'cancel with reason' => sub { > > subtest 'cancel all with reason' => sub { > plan tests => 7; >- my $biblioitem = $builder->build_object( { class => 'Koha::Biblioitems' } ); > my $library = $builder->build_object( { class => 'Koha::Libraries' } ); >- my $itemtype = $builder->build_object( { class => 'Koha::ItemTypes', value => { rentalcharge => 0 } } ); >- my $item_info = { >- biblionumber => $biblioitem->biblionumber, >- biblioitemnumber => $biblioitem->biblioitemnumber, >- homebranch => $library->branchcode, >- holdingbranch => $library->branchcode, >- itype => $itemtype->itemtype, >- }; >- my $item = $builder->build_object( { class => 'Koha::Items', value => $item_info } ); >+ my $item = $builder->build_sample_item({ library => $library->branchcode }); > my $manager = $builder->build_object( { class => "Koha::Patrons" } ); > t::lib::Mocks::mock_userenv( { patron => $manager, branchcode => $manager->branchcode } ); > >-- >2.20.1
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 25534
:
105034
|
105035
|
105036
|
105077
|
105078
|
105079
|
105105
|
105106
|
105108
|
105109
|
105110
|
105111
|
105112
|
105113
|
105114
|
105115
|
105116
|
105117
|
105118
|
105119
|
105120
|
105121
|
105122
|
105147
|
105148
|
105149
|
105150
|
105151
|
108476
|
108477
|
108478
|
108479
|
108480
|
108481
|
108746
|
108747
|
108748
|
108749
|
108750
|
108751
|
108752
|
108753
|
108754
|
108755
|
108756
|
108757
|
108805
|
108806
|
108891
|
108892
|
108893
|
108894
|
108895
|
108896
|
108897
|
108898
|
108899
|
108900
|
108901
|
108902
|
108903
|
108904
| 108977 |
108985
|
108986
|
108990
|
114026
|
114027
|
114788