From 08e20b06531cd4ad9ba0aa691af8681c724a9c7e 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 --- 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 80ba0458ba..6d65f88b8b 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 100644 --- 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