Bugzilla – Attachment 151917 Details for
Bug 33608
Allow to get statistics about found/recovered books
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 33608: Rearranging Stats.t, removing useless t version
Bug-33608-Rearranging-Statst-removing-useless-t-ve.patch (text/plain), 2.61 KB, created by
Owen Leonard
on 2023-06-01 12:24:46 UTC
(
hide
)
Description:
Bug 33608: Rearranging Stats.t, removing useless t version
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2023-06-01 12:24:46 UTC
Size:
2.61 KB
patch
obsolete
>From 03dc5602e008ea9bd2d27a9e96a23c4c689f7d98 Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Wed, 26 Apr 2023 14:08:18 +0200 >Subject: [PATCH] Bug 33608: Rearranging Stats.t, removing useless t version > >Subtest, modules, license. >The t/Stats.t is as good as empty, can be removed. > >Test plan: >Run t/db_dependent/Stats.t > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Signed-off-by: Owen Leonard <oleonard@myacpl.org> >--- > t/Stats.t | 14 -------------- > t/db_dependent/Stats.t | 39 ++++++++++++++++++++++++--------------- > 2 files changed, 24 insertions(+), 29 deletions(-) > delete mode 100755 t/Stats.t > >diff --git a/t/Stats.t b/t/Stats.t >deleted file mode 100755 >index d56c2c93b6..0000000000 >--- a/t/Stats.t >+++ /dev/null >@@ -1,14 +0,0 @@ >-#!/usr/bin/perl >-# >-# This Koha test module is a stub! >-# Add more tests here!!! >- >-use strict; >-use warnings; >- >-use Test::More tests => 1; >- >-BEGIN { >- use_ok('C4::Stats'); >-} >- >diff --git a/t/db_dependent/Stats.t b/t/db_dependent/Stats.t >index 117dfbea28..aebcaa99a6 100755 >--- a/t/db_dependent/Stats.t >+++ b/t/db_dependent/Stats.t >@@ -1,27 +1,35 @@ > #!/usr/bin/perl > >+# Copyright 2013, 2023 Koha Development team >+# >+# This file is part of Koha >+# >+# Koha is free software; you can redistribute it and/or modify it >+# under the terms of the GNU General Public License as published by >+# the Free Software Foundation; either version 3 of the License, or >+# (at your option) any later version. >+# >+# Koha is distributed in the hope that it will be useful, but >+# WITHOUT ANY WARRANTY; without even the implied warranty of >+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the >+# GNU General Public License for more details. >+# >+# You should have received a copy of the GNU General Public License >+# along with Koha; if not, see <http://www.gnu.org/licenses>. >+ > use Modern::Perl; >+use Test::More tests => 1; >+ >+use C4::Context; > use C4::Stats qw( UpdateStats ); > use Koha::Database; > >-use Test::More tests => 19; >- >-BEGIN { >- use_ok('C4::Stats', qw( UpdateStats )); >-} >-can_ok( >- 'C4::Stats', >- qw(UpdateStats) >-); >- > my $schema = Koha::Database->new->schema; > $schema->storage->txn_begin; > my $dbh = C4::Context->dbh; > >-# >-# Test UpdateStats >-# >- >+subtest 'UpdateStats' => sub { >+ plan tests => 17; > is (UpdateStats () ,undef, "UpdateStats returns undef if no params"); > > my $params = { >@@ -161,5 +169,6 @@ $sth->execute(); > $line = ${ $sth->fetchall_arrayref( {} ) }[0]; > is( $line->{location}, undef, > "UpdateStats sets location to NULL if undef is passed in." ); >+}; > >-# More tests to write! >+$schema->storage->txn_rollback; >-- >2.30.2
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 33608
:
150840
|
150841
|
150842
|
150843
|
150844
|
150845
|
150846
|
151051
|
151052
|
151053
|
151054
|
151055
|
151056
|
151057
|
151913
|
151915
|
151916
|
151917
|
151918
|
151919
|
151920
|
151921
|
151922
|
153653
|
153654
|
153655
|
153656
|
153657
|
153658
|
153659
|
153660
|
153661
|
153698
|
153699
|
153700
|
153701
|
153702
|
153703
|
153704
|
153705
|
153706
|
153707
|
153708
|
153709
|
153710
|
153711
|
153712
|
153713
|
153765
|
157440
|
157441
|
157442
|
157443
|
157444
|
157445
|
157446
|
157447
|
157448
|
157449