Bug 30129: Add test
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This commit is contained in:
parent
e30efbd0bd
commit
f8ca2d733c
1 changed files with 4 additions and 1 deletions
|
@ -24,6 +24,7 @@ use Test::Warn;
|
|||
use t::lib::TestBuilder;
|
||||
use C4::Context;
|
||||
use Koha::Database;
|
||||
use Koha::DateUtils qw( dt_from_string );
|
||||
use Koha::Items;
|
||||
use Koha::Reports;
|
||||
use Koha::Notice::Messages;
|
||||
|
@ -185,7 +186,7 @@ subtest 'GetParametersFromSQL+ValidateSQLParameters' => sub {
|
|||
};
|
||||
|
||||
subtest 'get_saved_reports' => sub {
|
||||
plan tests => 17;
|
||||
plan tests => 18;
|
||||
my $dbh = C4::Context->dbh;
|
||||
$dbh->do(q|DELETE FROM saved_sql|);
|
||||
$dbh->do(q|DELETE FROM saved_reports|);
|
||||
|
@ -220,6 +221,8 @@ subtest 'get_saved_reports' => sub {
|
|||
|
||||
ok( 0 < scalar @{ get_saved_reports( $report_ids[0] ) }, "filter takes report id" );
|
||||
|
||||
ok( 0 < scalar @{ get_saved_reports({date => dt_from_string->ymd }) }, "filter takes date" );
|
||||
|
||||
my $r1 = Koha::Reports->find($report_ids[0]);
|
||||
$r1 = update_sql($r1->id, { %{$r1->unblessed}, borrowernumber => $r1->borrowernumber, name => 'Just another report' });
|
||||
is( $r1->cache_expiry, 300, 'cache_expiry has the correct default value, from DBMS' );
|
||||
|
|
Loading…
Reference in a new issue