diff --git a/Koha/Illbatch.pm b/Koha/Illbatch.pm index a44c344731..31048670f6 100644 --- a/Koha/Illbatch.pm +++ b/Koha/Illbatch.pm @@ -79,19 +79,6 @@ sub library { return Koha::Library->_new_from_dbic($library); } -=head3 requests_count - - my $requests_count = Koha::Illbatch->requests_count; - -Return the number of requests associated with this batch - -=cut - -sub requests_count { - my ($self) = @_; - return Koha::Illrequests->search( { batch_id => $self->id } )->count; -} - =head3 requests Return the I for this batch diff --git a/t/db_dependent/Illbatches.t b/t/db_dependent/Illbatches.t index 18f79bab9b..d0c465217a 100755 --- a/t/db_dependent/Illbatches.t +++ b/t/db_dependent/Illbatches.t @@ -27,7 +27,7 @@ use t::lib::TestBuilder; use Test::MockObject; use Test::MockModule; -use Test::More tests => 7; +use Test::More tests => 6; my $schema = Koha::Database->new->schema; my $builder = t::lib::TestBuilder->new; @@ -36,8 +36,6 @@ use_ok('Koha::Illbatches'); $schema->storage->txn_begin; -Koha::Illrequests->search->delete; - # Create a patron my $patron = $builder->build( { source => 'Borrower' } ); @@ -77,10 +75,6 @@ my $illrq = $builder->build( ); my $illrq_obj = Koha::Illrequests->find( $illrq->{illrequest_id} ); -# Check requests_count -my $requests_count = $illbatch->requests_count; -is( $requests_count, 1, 'requests_count returns correctly' ); - # Check patron my $batch_patron = $illbatch->patron; isa_ok( $batch_patron, 'Koha::Patron' );