Bugzilla – Attachment 92543 Details for
Bug 23413
Add a holds routine to Koha::Items to fetch related holds
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 23413: Update tests to use build_sample_biblio
Bug-23413-Update-tests-to-use-buildsamplebiblio.patch (text/plain), 2.07 KB, created by
Nick Clemens
on 2019-09-03 11:21:23 UTC
(
hide
)
Description:
Bug 23413: Update tests to use build_sample_biblio
Filename:
MIME Type:
Creator:
Nick Clemens
Created:
2019-09-03 11:21:23 UTC
Size:
2.07 KB
patch
obsolete
>From 9f440cfffab374d7732d4a6afbdff90333936bf5 Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Tue, 3 Sep 2019 11:20:24 +0000 >Subject: [PATCH] Bug 23413: Update tests to use build_sample_biblio > >Before these changes the tests fail if run under Elasticsearch > >This makes sure they pass either way >--- > t/db_dependent/Koha/Items.t | 30 ++++++++++++------------------ > 1 file changed, 12 insertions(+), 18 deletions(-) > >diff --git a/t/db_dependent/Koha/Items.t b/t/db_dependent/Koha/Items.t >index 6c1bedc1f9..57dbbf9d73 100644 >--- a/t/db_dependent/Koha/Items.t >+++ b/t/db_dependent/Koha/Items.t >@@ -38,24 +38,18 @@ my $builder = t::lib::TestBuilder->new; > my $biblioitem = $builder->build( { source => 'Biblioitem' } ); > my $library = $builder->build( { source => 'Branch' } ); > my $nb_of_items = Koha::Items->search->count; >-my $new_item_1 = Koha::Item->new( >- { biblionumber => $biblioitem->{biblionumber}, >- biblioitemnumber => $biblioitem->{biblioitemnumber}, >- homebranch => $library->{branchcode}, >- holdingbranch => $library->{branchcode}, >- barcode => "a_barcode_for_t", >- itype => 'BK', >- } >-)->store; >-my $new_item_2 = Koha::Item->new( >- { biblionumber => $biblioitem->{biblionumber}, >- biblioitemnumber => $biblioitem->{biblioitemnumber}, >- homebranch => $library->{branchcode}, >- holdingbranch => $library->{branchcode}, >- barcode => "another_bc_for_t", >- itype => 'BK', >- } >-)->store; >+my $biblio = $builder->build_sample_biblio(); >+my $new_item_1 = $builder->build_sample_item({ >+ biblionumber => $biblio->biblionumber, >+ homebranch => $library->{branchcode}, >+ holdingbranch => $library->{branchcode}, >+}); >+my $new_item_2 = $builder->build_sample_item({ >+ biblionumber => $biblio->biblionumber, >+ homebranch => $library->{branchcode}, >+ holdingbranch => $library->{branchcode}, >+}); >+ > > t::lib::Mocks::mock_userenv({ branchcode => $library->{branchcode} }); > >-- >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 23413
:
91912
|
92123
|
92128
|
92129
|
92542
|
92543
|
92544
|
94686
|
94722