Bugzilla – Attachment 111748 Details for
Bug 26582
Add Koha::Acquisition::Basket->close
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 26582: (QA follow-up) Rename closed => is_closed
Bug-26582-QA-follow-up-Rename-closed--isclosed.patch (text/plain), 2.37 KB, created by
Tomás Cohen Arazi (tcohen)
on 2020-10-15 14:33:50 UTC
(
hide
)
Description:
Bug 26582: (QA follow-up) Rename closed => is_closed
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2020-10-15 14:33:50 UTC
Size:
2.37 KB
patch
obsolete
>From afa5b0e8d0135cda5688b2d0d2f73da898db6653 Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Thu, 15 Oct 2020 11:33:33 -0300 >Subject: [PATCH] Bug 26582: (QA follow-up) Rename closed => is_closed > >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> >--- > Koha/Acquisition/Basket.pm | 8 ++++---- > t/db_dependent/Koha/Acquisition/Basket.t | 8 ++++---- > 2 files changed, 8 insertions(+), 8 deletions(-) > >diff --git a/Koha/Acquisition/Basket.pm b/Koha/Acquisition/Basket.pm >index 6cfa64c76fc..35255bee4b2 100644 >--- a/Koha/Acquisition/Basket.pm >+++ b/Koha/Acquisition/Basket.pm >@@ -156,15 +156,15 @@ sub authorizer { > return scalar Koha::Patrons->find($self->authorisedby); > } > >-=head3 closed >+=head3 is_closed > >- if ( $basket->closed ) { ... } >+ if ( $basket->is_closed ) { ... } > > Returns a boolean value representing if the basket is closed. > > =cut > >-sub closed { >+sub is_closed { > my ($self) = @_; > > return ($self->closedate) ? 1 : 0; >@@ -185,7 +185,7 @@ sub close { > my ($self) = @_; > > Koha::Exceptions::Acquisition::Basket::AlreadyClosed->throw >- if $self->closed; >+ if $self->is_closed; > > $self->_result->result_source->schema->txn_do( > sub { >diff --git a/t/db_dependent/Koha/Acquisition/Basket.t b/t/db_dependent/Koha/Acquisition/Basket.t >index 0570e244d4a..c8819457a91 100755 >--- a/t/db_dependent/Koha/Acquisition/Basket.t >+++ b/t/db_dependent/Koha/Acquisition/Basket.t >@@ -303,7 +303,7 @@ subtest 'orders' => sub { > $schema->storage->txn_rollback; > }; > >-subtest 'closed() tests' => sub { >+subtest 'is_closed() tests' => sub { > > plan tests => 2; > >@@ -327,8 +327,8 @@ subtest 'closed() tests' => sub { > } > ); > >- ok( $closed_basket->closed, 'Closed basket is tested as closed' ); >- ok( !$open_basket->closed, 'Open basket is tested as open' ); >+ ok( $closed_basket->is_closed, 'Closed basket is tested as closed' ); >+ ok( !$open_basket->is_closed, 'Open basket is tested as open' ); > > $schema->storage->txn_rollback; > }; >@@ -363,7 +363,7 @@ subtest 'close() tests' => sub { > > $basket->close; > >- ok( $basket->closed, 'Basket is closed' ); >+ ok( $basket->is_closed, 'Basket is closed' ); > my $ordered_orders = $basket->orders->search({ orderstatus => 'ordered' }); > is( $ordered_orders->count, 3, 'Only open orders have been marked as ordered' ); > >-- >2.28.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 26582
:
111003
|
111004
|
111032
|
111033
|
111528
|
111529
| 111748