https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7728

--- Comment #12 from Jonathan Druart <[email protected]> 
---
Comment on attachment 47303
  --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=47303
BZ 7728 adding unit test

Review of attachment 47303:
 --> 
(https://bugs.koha-community.org/bugzilla3/page.cgi?id=splinter.html&bug=7728&attachment=47303)
-----------------------------------------------------------------

1/ Should not we update the histenddate if it has been set?
2/ Could we imagine fixing existing DB entries?

::: t/db_dependent/Serials/ReNewSubscription.t
@@ +40,5 @@
> +
> +#my $mContext = new Test::MockModule('C4::Context');
> +#$mContext->mock( 'userenv', sub {
> +#    return { branch => $library->{branchcode} };
> +#});

Useless commented lines, please remove.

@@ +94,5 @@
> +# Actual testing starts here!
> +
> +# 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} } );

use
  Koha::Subscription::Histories->find( $subscription->{subscriptionid} )
when you already have the primary key.

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[email protected]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to