Bugzilla – Attachment 187601 Details for
Bug 28530
Allow configuration of floating limits by item type
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 28530: Adjust tests
Bug-28530-Adjust-tests.patch (text/plain), 2.38 KB, created by
Lucas Gass (lukeg)
on 2025-10-08 21:08:49 UTC
(
hide
)
Description:
Bug 28530: Adjust tests
Filename:
MIME Type:
Creator:
Lucas Gass (lukeg)
Created:
2025-10-08 21:08:49 UTC
Size:
2.38 KB
patch
obsolete
>From dfcdf18cf11f51cd1342ddb7ee21543d78c29cb1 Mon Sep 17 00:00:00 2001 >From: Lucas Gass <lucas@bywatersolutions.com> >Date: Wed, 8 Oct 2025 21:08:32 +0000 >Subject: [PATCH] Bug 28530: Adjust tests > >--- > t/db_dependent/Koha/Library/FloatLimits.t | 17 +++++++++++------ > 1 file changed, 11 insertions(+), 6 deletions(-) > >diff --git a/t/db_dependent/Koha/Library/FloatLimits.t b/t/db_dependent/Koha/Library/FloatLimits.t >index c64dced791b..b0d3c4da093 100755 >--- a/t/db_dependent/Koha/Library/FloatLimits.t >+++ b/t/db_dependent/Koha/Library/FloatLimits.t >@@ -15,7 +15,7 @@ > # GNU General Public License for more details. > # > # You should have received a copy of the GNU General Public License >-# along with Koha; if not, see <http://www.gnu.org/licenses>. >+# along with Koha; if not, see <https://www.gnu.org/licenses>. > > use Modern::Perl; > >@@ -109,7 +109,8 @@ my $float_limit3 = Koha::Library::FloatLimit->new( > )->store(); > > is( >- Koha::Library::FloatLimits->lowest_ratio_library( $item, $library1->{branchcode} )->branchcode, >+ Koha::Library::FloatLimits->lowest_ratio_library( $item, $library1->{branchcode}, $item->holdingbranch ) >+ ->branchcode, > $library3->{branchcode}, > "Correct library selected for float limit transfer" > ); >@@ -137,8 +138,10 @@ subtest 'FloatLimits: General tests' => sub { > itype => $builder->build_object( { class => 'Koha::ItemTypes' } )->itemtype, > } > ); >- >- my $no_limits_result = Koha::Library::FloatLimits->lowest_ratio_library( $no_limits_item, $library1->{branchcode} ); >+ my $no_limits_result = Koha::Library::FloatLimits->lowest_ratio_library( >+ $no_limits_item, $library1->{branchcode}, >+ $no_limits_item->holdingbranch >+ ); > is( $no_limits_result, undef, "Returns undef when no float limits defined" ); > > # Test with only zero float limits >@@ -163,8 +166,10 @@ subtest 'FloatLimits: General tests' => sub { > itype => $unknown_itemtype->itemtype, > } > ); >- >- my $unknown_result = Koha::Library::FloatLimits->lowest_ratio_library( $unknown_item, $library1->{branchcode} ); >+ my $unknown_result = Koha::Library::FloatLimits->lowest_ratio_library( >+ $unknown_item, $library1->{branchcode}, >+ $unknown_item->holdingbranch >+ ); > is( $unknown_result, undef, "Returns undef for item type not in float limits" ); > > $schema->storage->txn_rollback; >-- >2.39.5
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 28530
:
160038
|
160039
|
160040
|
160041
|
160042
|
160043
|
160044
|
160045
|
160046
|
160047
|
160048
|
160049
|
160050
|
160053
|
160054
|
160055
|
160056
|
160057
|
160058
|
160061
|
160062
|
160063
|
160064
|
160065
|
160066
|
160067
|
160068
|
160071
|
160072
|
160073
|
160074
|
160075
|
160076
|
160077
|
160078
|
160079
|
160080
|
160081
|
160082
|
160083
|
160084
|
163919
|
168343
|
168344
|
168345
|
168346
|
168347
|
168348
|
168349
|
168350
|
178762
|
178763
|
178764
|
178765
|
178766
|
178767
|
178768
|
178769
|
178783
|
178784
|
178785
|
178934
|
178935
|
178936
|
178937
|
178938
|
178939
|
178940
|
178941
|
178942
|
178943
|
178944
|
178945
|
178946
|
179943
|
179944
|
179945
|
179946
|
179947
|
179948
|
179949
|
179950
|
179951
|
179952
|
179953
|
179954
|
179955
|
180028
|
182931
|
184754
|
184755
|
184917
|
184936
|
184951
|
184952
|
184953
|
184954
|
184955
|
184956
|
184957
|
184958
|
184959
|
184960
|
184961
|
184963
|
184965
|
184966
|
184967
|
185038
|
185836
|
185837
|
185838
|
185839
|
185840
|
185841
|
185842
|
185843
|
187525
| 187601