View | Details | Raw Unified | Return to bug 23624
Collapse All | Expand All

(-)a/t/db_dependent/Reports/Guided.t (-2 / +24 lines)
Lines 18-29 Link Here
18
18
19
use Modern::Perl;
19
use Modern::Perl;
20
20
21
use Test::More tests => 10;
21
use Test::More tests => 11;
22
use Test::Warn;
22
use Test::Warn;
23
23
24
use t::lib::TestBuilder;
24
use t::lib::TestBuilder;
25
use C4::Context;
25
use C4::Context;
26
use Koha::Database;
26
use Koha::Database;
27
use Koha::Items;
27
use Koha::Reports;
28
use Koha::Reports;
28
use Koha::Notice::Messages;
29
use Koha::Notice::Messages;
29
30
Lines 410-415 subtest 'Email report test' => sub { Link Here
410
411
411
$schema->storage->txn_rollback;
412
$schema->storage->txn_rollback;
412
413
414
subtest 'nb_rows() tests' => sub {
415
416
    plan tests => 1;
417
418
    $schema->storage->txn_begin;
419
420
    my $items_count = Koha::Items->search->count;
421
    $builder->build_object({ class => 'Koha::Items' });
422
    $builder->build_object({ class => 'Koha::Items' });
423
    $items_count += 2;
424
425
    my $query = q{
426
        SELECT * FROM items xxx
427
    };
428
429
    my $nb_rows = nb_rows( $query );
430
431
    is( $nb_rows, $items_count, 'nb_rows returns the right value' );
432
433
    $schema->storage->txn_rollback;
434
};
435
413
sub trim {
436
sub trim {
414
    my ($s) = @_;
437
    my ($s) = @_;
415
    $s =~ s/^\s*(.*?)\s*$/$1/s;
438
    $s =~ s/^\s*(.*?)\s*$/$1/s;
416
- 

Return to bug 23624