Bugzilla – Attachment 98216 Details for
Bug 24546
Club/Hold.t has a wrong call to build_sample_item
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 24546: Fix intentions of build_sample_item in Club/Hold.t
Bug-24546-Fix-intentions-of-buildsampleitem-in-Clu.patch (text/plain), 2.04 KB, created by
David Nind
on 2020-01-31 08:10:58 UTC
(
hide
)
Description:
Bug 24546: Fix intentions of build_sample_item in Club/Hold.t
Filename:
MIME Type:
Creator:
David Nind
Created:
2020-01-31 08:10:58 UTC
Size:
2.04 KB
patch
obsolete
>From ae8046be4d0ebc0e4b9339961f9bae9f66845b66 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Thu, 30 Jan 2020 15:38:26 +0100 >Subject: [PATCH] Bug 24546: Fix intentions of build_sample_item in Club/Hold.t > >In t/db_dependent/Koha/Club/Hold.t: >my $item1 = $builder->build_sample_item({ branchcode => $library->branchcode }); >my $item2 = $builder->build_sample_item({ branchcode => $library->branchcode }); > >build_sample_item takes either "library" or the item's attributes. >branchcode is not part of the item's table, so what those 2 lines are trying to acchieve is wrong. > >Test plan: > % prove t/db_dependent/Koha/Club/Hold.t >must return green before and after this patch > >Note that this patch also remove an uneeded debugging statement. > >This has been caught by bug 24363. > >Signed-off-by: David Nind <david@davidnind.com> >--- > t/db_dependent/Koha/Club/Hold.t | 7 +++---- > 1 file changed, 3 insertions(+), 4 deletions(-) > >diff --git a/t/db_dependent/Koha/Club/Hold.t b/t/db_dependent/Koha/Club/Hold.t >index b672f1cacd..6aee1e4dcf 100644 >--- a/t/db_dependent/Koha/Club/Hold.t >+++ b/t/db_dependent/Koha/Club/Hold.t >@@ -42,10 +42,9 @@ subtest 'add' => sub { > > my $club = $builder->build_object({ class => 'Koha::Clubs' }); > my $library = $builder->build_object({ class => 'Koha::Libraries' }); >- my $item1 = $builder->build_sample_item({ branchcode => $library->branchcode }); >- my $item2 = $builder->build_sample_item({ branchcode => $library->branchcode }); >+ my $item1 = $builder->build_sample_item({ library => $library->branchcode }); >+ my $item2 = $builder->build_sample_item({ library => $library->branchcode }); > >- use Data::Printer colored => 1; > try { > Koha::Club::Hold::add({ club_id => $club->id, biblio_id => $item1->biblionumber, pickup_library_id => $library->branchcode }); > } catch { >@@ -84,4 +83,4 @@ subtest 'add' => sub { > is($patron_hold->patron_id, $hold->borrowernumber, 'Patron must be the same'); > > $schema->storage->txn_rollback; >-} >\ No newline at end of file >+} >-- >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 24546
:
98160
|
98216
|
98227