Lines 19-24
use Modern::Perl;
Link Here
|
19 |
|
19 |
|
20 |
use Test::More tests => 18; |
20 |
use Test::More tests => 18; |
21 |
use Test::Warn; |
21 |
use Test::Warn; |
|
|
22 |
use t::lib::TestBuilder; |
22 |
|
23 |
|
23 |
use C4::Context; |
24 |
use C4::Context; |
24 |
use Koha::Database; |
25 |
use Koha::Database; |
Lines 33-38
can_ok(
Link Here
|
33 |
|
34 |
|
34 |
my $schema = Koha::Database->new->schema; |
35 |
my $schema = Koha::Database->new->schema; |
35 |
$schema->storage->txn_begin; |
36 |
$schema->storage->txn_begin; |
|
|
37 |
my $builder = t::lib::TestBuilder->new; |
36 |
|
38 |
|
37 |
my $dbh = C4::Context->dbh; |
39 |
my $dbh = C4::Context->dbh; |
38 |
$dbh->do(q|DELETE FROM saved_sql|); |
40 |
$dbh->do(q|DELETE FROM saved_sql|); |
Lines 45-51
my $count = scalar( @{ get_saved_reports() } );
Link Here
|
45 |
is( $count, 0, "There is no report" ); |
47 |
is( $count, 0, "There is no report" ); |
46 |
|
48 |
|
47 |
my @report_ids; |
49 |
my @report_ids; |
48 |
for my $id ( 1 .. 3 ) { |
50 |
foreach ( 1..3 ) { |
|
|
51 |
my $id = $builder->build({ source => 'Borrower' })->{ borrowernumber }; |
49 |
push @report_ids, save_report({ |
52 |
push @report_ids, save_report({ |
50 |
borrowernumber => $id, |
53 |
borrowernumber => $id, |
51 |
sql => "SQL$id", |
54 |
sql => "SQL$id", |
52 |
- |
|
|