Bug 7728: QA fixes
- Remove useless comments
- Use Koha::Objects::find instead of Koha::Objects::search
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit c26afc2568)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
This commit is contained in:
parent
7f4d6b4dd4
commit
719bd8e31e
|
|
@ -26,25 +26,15 @@ use Test::MockModule;
|
|||
use t::lib::TestBuilder;
|
||||
use t::lib::Mocks;
|
||||
|
||||
use C4::Context;
|
||||
use Koha::Database;
|
||||
use C4::Serials;
|
||||
|
||||
use Koha::Database;
|
||||
use Koha::Subscription::Histories;
|
||||
|
||||
my $schema = Koha::Database->new->schema;
|
||||
$schema->storage->txn_begin;
|
||||
|
||||
my $builder = t::lib::TestBuilder->new();
|
||||
#my $library = $builder->build({
|
||||
# source => 'Subscription',
|
||||
#});
|
||||
|
||||
#my $mContext = new Test::MockModule('C4::Context');
|
||||
#$mContext->mock( 'userenv', sub {
|
||||
# return { branch => $library->{branchcode} };
|
||||
#});
|
||||
|
||||
|
||||
#my $dbh = C4::Context->dbh; # after start transaction of testbuilder
|
||||
|
||||
# create fake numberpattern & fake periodicity
|
||||
my $frequency = $builder->build({
|
||||
|
|
@ -95,7 +85,7 @@ my $subscriptionhistory = $builder->build({
|
|||
|
||||
# Renew the subscription and check that enddate has not been set
|
||||
ReNewSubscription($subscription->{subscriptionid},'',"2016-01-01",'','',12,'');
|
||||
my @history = Koha::Subscription::Histories->search( {subscriptionid => $subscription->{subscriptionid} } );
|
||||
my @history = Koha::Subscription::Histories->find($subscription->{subscriptionid});
|
||||
|
||||
is ( $history[0]->histenddate(), undef, 'subscription history not empty after renewal');
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue