From 6e5b8c0c53f5dc28d44df3d5fed42df51ad7821f Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Fri, 18 Sep 2020 15:17:58 +0100 Subject: [PATCH] Bug 25767: (QA follow-up) receipt -> receive MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Kathleen Milne Signed-off-by: Katrin Fischer Signed-off-by: Joonas Kylmälä --- Koha/Item/Transfer.pm | 6 +++--- t/db_dependent/Koha/Item/Transfer.t | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Koha/Item/Transfer.pm b/Koha/Item/Transfer.pm index e2e62087da..0afe12ed1a 100644 --- a/Koha/Item/Transfer.pm +++ b/Koha/Item/Transfer.pm @@ -84,19 +84,19 @@ sub transit { return $self; } -=head3 receipt +=head3 receive Receive the transfer by setting the datearrived time. =cut -sub receipt { +sub receive { my ($self) = @_; # Throw exception if item is checked out Koha::Exceptions::Item::Transfer::Out->throw() if ($self->item->checkout); - # Update the receipt state + # Update the arrived date $self->set({ datearrived => dt_from_string })->store; ModDateLastSeen( $self->item->itemnumber ); diff --git a/t/db_dependent/Koha/Item/Transfer.t b/t/db_dependent/Koha/Item/Transfer.t index 2814acec5c..b82e2c8094 100755 --- a/t/db_dependent/Koha/Item/Transfer.t +++ b/t/db_dependent/Koha/Item/Transfer.t @@ -113,7 +113,7 @@ subtest 'transit tests' => sub { $schema->storage->txn_rollback; }; -subtest 'receipt tests' => sub { +subtest 'receive tests' => sub { plan tests => 5; $schema->storage->txn_begin; @@ -153,7 +153,7 @@ subtest 'receipt tests' => sub { ); is( ref($checkout), 'Koha::Checkout', 'Mock checkout added' ); - throws_ok { $transfer->receipt() } + throws_ok { $transfer->receive() } 'Koha::Exceptions::Item::Transfer::Out', 'Exception thrown if item is checked out'; @@ -161,7 +161,7 @@ subtest 'receipt tests' => sub { # Transit state set $transfer->discard_changes; - $transfer->receipt(); + $transfer->receive(); ok( $transfer->datearrived, 'Receipt set the datearrived for the transfer' ); # Last seen -- 2.20.1