Bugzilla – Attachment 160521 Details for
Bug 28294
C4::Circulation::updateWrongTransfer should be moved into Koha::
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 28294: Remove unit tests for updateWrongTransfer
Bug-28294-Remove-unit-tests-for-updateWrongTransfe.patch (text/plain), 3.43 KB, created by
Martin Renvoize (ashimema)
on 2024-01-04 12:30:06 UTC
(
hide
)
Description:
Bug 28294: Remove unit tests for updateWrongTransfer
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2024-01-04 12:30:06 UTC
Size:
3.43 KB
patch
obsolete
>From dac016e2af2531b0aa5826e563cbb9473e0fccdf Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Wed, 2 Feb 2022 10:39:19 +0000 >Subject: [PATCH] Bug 28294: Remove unit tests for updateWrongTransfer > >--- > t/db_dependent/Circulation.t | 44 ++---------------------------------- > 1 file changed, 2 insertions(+), 42 deletions(-) > >diff --git a/t/db_dependent/Circulation.t b/t/db_dependent/Circulation.t >index 288c5650139..9e5395ce47a 100755 >--- a/t/db_dependent/Circulation.t >+++ b/t/db_dependent/Circulation.t >@@ -18,7 +18,7 @@ > use Modern::Perl; > use utf8; > >-use Test::More tests => 67; >+use Test::More tests => 66; > use Test::Exception; > use Test::MockModule; > use Test::Deep qw( cmp_deeply ); >@@ -33,7 +33,7 @@ use t::lib::TestBuilder; > > use C4::Accounts; > use C4::Calendar qw( new insert_single_holiday insert_week_day_holiday delete_holiday ); >-use C4::Circulation qw( AddIssue AddReturn CanBookBeRenewed GetIssuingCharges AddRenewal GetSoonestRenewDate GetLatestAutoRenewDate LostItem GetUpcomingDueIssues CanBookBeIssued AddIssuingCharge MarkIssueReturned ProcessOfflinePayment transferbook updateWrongTransfer ); >+use C4::Circulation qw( AddIssue AddReturn CanBookBeRenewed GetIssuingCharges AddRenewal GetSoonestRenewDate GetLatestAutoRenewDate LostItem GetUpcomingDueIssues CanBookBeIssued AddIssuingCharge MarkIssueReturned ProcessOfflinePayment transferbook ); > use C4::Biblio; > use C4::Items qw( ModItemTransfer ); > use C4::Log; >@@ -5843,46 +5843,6 @@ subtest "Item's onloan value should be set if checked out item is checked out to > ok( $item->get_from_storage->onloan, "Item's onloan column is set after second checkout" ); > }; > >-subtest "updateWrongTransfer tests" => sub { >- plan tests => 5; >- >- my $library1 = $builder->build_object( { class => 'Koha::Libraries' } ); >- my $library2 = $builder->build_object( { class => 'Koha::Libraries' } ); >- my $library3 = $builder->build_object( { class => 'Koha::Libraries' } ); >- my $item = $builder->build_sample_item( >- { >- homebranch => $library1->branchcode, >- holdingbranch => $library2->branchcode, >- datelastseen => undef >- } >- ); >- >- my $transfer = $builder->build_object( >- { >- class => 'Koha::Item::Transfers', >- value => { >- itemnumber => $item->itemnumber, >- frombranch => $library2->branchcode, >- tobranch => $library1->branchcode, >- daterequested => dt_from_string, >- datesent => dt_from_string, >- datecancelled => undef, >- datearrived => undef, >- reason => 'Manual' >- } >- } >- ); >- is( ref($transfer), 'Koha::Item::Transfer', 'Mock transfer added' ); >- >- my $new_transfer = C4::Circulation::updateWrongTransfer($item->itemnumber, $library1->branchcode); >- is(ref($new_transfer), 'Koha::Item::Transfer', "updateWrongTransfer returns a 'Koha::Item::Transfer' object"); >- ok( !$new_transfer->in_transit, "New transfer is NOT created as in transit (or cancelled)"); >- >- my $original_transfer = $transfer->get_from_storage; >- ok( defined($original_transfer->datecancelled), "Original transfer was cancelled"); >- is( $original_transfer->cancellation_reason, 'WrongTransfer', "Original transfer cancellation reason is 'WrongTransfer'"); >-}; >- > subtest "SendCirculationAlert" => sub { > plan tests => 3; > >-- >2.43.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 28294
:
120637
|
121062
|
121063
|
121064
|
121077
|
121078
|
121079
|
121095
|
121096
|
121097
|
121714
|
121715
|
121716
|
130082
|
130083
|
130084
|
130085
|
130086
|
130087
|
132212
|
132213
|
132214
|
132215
|
132216
|
132217
|
160516
|
160517
|
160518
|
160519
|
160520
|
160521
|
160536
|
160692
|
168281
|
172778
|
172781
|
173856
|
174805