Bugzilla – Attachment 93154 Details for
Bug 23624
Count rows in report without (potentially) consuming all memory
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 23624: Unit tests
Bug-23624-Unit-tests.patch (text/plain), 1.55 KB, created by
Tomás Cohen Arazi (tcohen)
on 2019-09-25 13:45:05 UTC
(
hide
)
Description:
Bug 23624: Unit tests
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2019-09-25 13:45:05 UTC
Size:
1.55 KB
patch
obsolete
>From 5145580973b9c91164127e39b293b8c696be7b7c Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Thu, 19 Sep 2019 10:50:46 -0300 >Subject: [PATCH] Bug 23624: Unit tests > >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> > >Signed-off-by: Liz Rea <wizzyrea@gmail.com> >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> >--- > t/db_dependent/Reports/Guided.t | 25 ++++++++++++++++++++++++- > 1 file changed, 24 insertions(+), 1 deletion(-) > >diff --git a/t/db_dependent/Reports/Guided.t b/t/db_dependent/Reports/Guided.t >index 9c87dcf531..a2c90eee2f 100644 >--- a/t/db_dependent/Reports/Guided.t >+++ b/t/db_dependent/Reports/Guided.t >@@ -18,12 +18,13 @@ > > use Modern::Perl; > >-use Test::More tests => 10; >+use Test::More tests => 11; > use Test::Warn; > > use t::lib::TestBuilder; > use C4::Context; > use Koha::Database; >+use Koha::Items; > use Koha::Reports; > use Koha::Notice::Messages; > >@@ -410,6 +411,28 @@ subtest 'Email report test' => sub { > > $schema->storage->txn_rollback; > >+subtest 'nb_rows() tests' => sub { >+ >+ plan tests => 1; >+ >+ $schema->storage->txn_begin; >+ >+ my $items_count = Koha::Items->search->count; >+ $builder->build_object({ class => 'Koha::Items' }); >+ $builder->build_object({ class => 'Koha::Items' }); >+ $items_count += 2; >+ >+ my $query = q{ >+ SELECT * FROM items xxx >+ }; >+ >+ my $nb_rows = nb_rows( $query ); >+ >+ is( $nb_rows, $items_count, 'nb_rows returns the right value' ); >+ >+ $schema->storage->txn_rollback; >+}; >+ > sub trim { > my ($s) = @_; > $s =~ s/^\s*(.*?)\s*$/$1/s; >-- >2.23.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 23624
:
92841
|
92903
|
92968
|
92969
|
92970
|
92974
|
92975
|
92976
|
92995
|
93037
|
93153
| 93154 |
93155
|
93156
|
93157