Bugzilla – Attachment 168242 Details for
Bug 29087
Holds to pull list can crash with a SQL::Abstract puke
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 29087: (QA follow-up): Fix QA tests
Bug-29087-QA-follow-up-Fix-QA-tests.patch (text/plain), 3.63 KB, created by
Matt Blenkinsop
on 2024-06-28 14:01:28 UTC
(
hide
)
Description:
Bug 29087: (QA follow-up): Fix QA tests
Filename:
MIME Type:
Creator:
Matt Blenkinsop
Created:
2024-06-28 14:01:28 UTC
Size:
3.63 KB
patch
obsolete
>From 2600bae890e8f40fd867bf918cde25a6f1691614 Mon Sep 17 00:00:00 2001 >From: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> >Date: Fri, 28 Jun 2024 13:59:52 +0000 >Subject: [PATCH] Bug 29087: (QA follow-up): Fix QA tests > >--- > Koha/Items.pm | 4 ++-- > t/db_dependent/Koha/Holds.t | 4 ++-- > t/db_dependent/Koha/Items.t | 12 +++++++----- > 3 files changed, 11 insertions(+), 9 deletions(-) > >diff --git a/Koha/Items.pm b/Koha/Items.pm >index 41bba880f1..0c5559a1d0 100644 >--- a/Koha/Items.pm >+++ b/Koha/Items.pm >@@ -71,7 +71,7 @@ sub filter_by_for_hold { > } > ); > my @hold_not_allowed_itypes; >- if ( $default_rule ) { >+ if ($default_rule) { > @hold_not_allowed_itypes = Koha::ItemTypes->search->get_column('itemtype'); > my @hold_allowed_itypes = Koha::CirculationRules->search( > { >@@ -81,7 +81,7 @@ sub filter_by_for_hold { > categorycode => undef, > } > )->get_column('itemtype'); >- @hold_not_allowed_itypes = array_minus( @hold_not_allowed_itypes, @hold_allowed_itypes ) >+ @hold_not_allowed_itypes = array_minus( @hold_not_allowed_itypes, @hold_allowed_itypes ); > } else { > @hold_not_allowed_itypes = Koha::CirculationRules->search( > { >diff --git a/t/db_dependent/Koha/Holds.t b/t/db_dependent/Koha/Holds.t >index f1f32ad6a7..f125551f71 100755 >--- a/t/db_dependent/Koha/Holds.t >+++ b/t/db_dependent/Koha/Holds.t >@@ -534,8 +534,8 @@ subtest 'get_items_that_can_fill' => sub { > > Koha::CirculationRules->search( > { >- rule_name => 'holdallowed', >- rule_value => 'not_allowed', >+ rule_name => 'holdallowed', >+ rule_value => 'not_allowed', > } > )->delete; > >diff --git a/t/db_dependent/Koha/Items.t b/t/db_dependent/Koha/Items.t >index 73abcf9ef3..58e1c1f113 100755 >--- a/t/db_dependent/Koha/Items.t >+++ b/t/db_dependent/Koha/Items.t >@@ -2011,10 +2011,10 @@ subtest 'filter_by_for_hold' => sub { > rule_value => 'not_allowed', > } > ); >- my $itemtype = $builder->build_object({ class => 'Koha::ItemTypes' }); >+ my $itemtype = $builder->build_object( { class => 'Koha::ItemTypes' } ); > my $not_holdable_itemtype = $itemtype->itemtype; >- my $itemtype2 = $builder->build_object({ class => 'Koha::ItemTypes' }); >- my $holdable_itemtype = $itemtype2->itemtype; >+ my $itemtype2 = $builder->build_object( { class => 'Koha::ItemTypes' } ); >+ my $holdable_itemtype = $itemtype2->itemtype; > Koha::CirculationRules->set_rule( > { > branchcode => undef, >@@ -2028,9 +2028,11 @@ subtest 'filter_by_for_hold' => sub { > my $library = $builder->build_object({ class => 'Koha::Libraries' }); > t::lib::Mocks::mock_preference('IndependentBranches', 0); # more robust tests > is( $biblio->items->filter_by_for_hold->count, 0, 'no item yet' ); >- $builder->build_sample_item( { biblionumber => $biblio->biblionumber, notforloan => 0, itype => $not_holdable_itemtype } ); >+ $builder->build_sample_item( >+ { biblionumber => $biblio->biblionumber, notforloan => 0, itype => $not_holdable_itemtype } ); > is( $biblio->items->filter_by_for_hold->count, 0, 'default rule prevents hold' ); >- $builder->build_sample_item( { biblionumber => $biblio->biblionumber, notforloan => 0, itype => $holdable_itemtype } ); >+ $builder->build_sample_item( >+ { biblionumber => $biblio->biblionumber, notforloan => 0, itype => $holdable_itemtype } ); > is( $biblio->items->filter_by_for_hold->count, 1, 'hold allowed despite default rule' ); > > # Reset items and circ rules to remove default rule >-- >2.39.3 (Apple Git-146)
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 29087
:
127859
|
164936
|
166354
|
166355
|
166359
|
166360
|
166527
|
166528
|
168241
|
168242
|
169179
|
169180
|
169181