Bugzilla – Attachment 64145 Details for
Bug 18767
Useless debugging info in GetDailyQuote.t
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 18767: Remove useless diags from GetDailyQuote.t
Bug-18767-Remove-useless-diags-from-GetDailyQuotet.patch (text/plain), 2.61 KB, created by
Jonathan Druart
on 2017-06-09 14:56:20 UTC
(
hide
)
Description:
Bug 18767: Remove useless diags from GetDailyQuote.t
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2017-06-09 14:56:20 UTC
Size:
2.61 KB
patch
obsolete
>From 78a9f39f9a97179af3e3a38cf8cb17b3f043d88a Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Fri, 9 Jun 2017 11:16:08 -0300 >Subject: [PATCH] Bug 18767: Remove useless diags from GetDailyQuote.t > >This tests print useless debugging info. > >To test: >- Run: > $ sudo koha-shell kohadev > k$ cd kohaclone > k$ prove t/db_dependent/Koha/GetDailyQuote.t >=> FAIL: Some output telling what is doing on each step is printed. >- Apply the patch >- Run > k$ prove t/db_dependent/Koha/GetDailyQuote.t >=> SUCCESS: No output, YAY! >- Sign off :-D > >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> > >Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >--- > t/db_dependent/Koha/GetDailyQuote.t | 23 +++++++++++++++++------ > 1 file changed, 17 insertions(+), 6 deletions(-) > >diff --git a/t/db_dependent/Koha/GetDailyQuote.t b/t/db_dependent/Koha/GetDailyQuote.t >index d003218..08ec0bb 100644 >--- a/t/db_dependent/Koha/GetDailyQuote.t >+++ b/t/db_dependent/Koha/GetDailyQuote.t >@@ -1,8 +1,24 @@ > #!/usr/bin/perl > >+# 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 => 12; >+ > use C4::Koha qw( GetDailyQuote ); > use DateTime::Format::MySQL; > use Koha::DateUtils qw(dt_from_string); >@@ -37,19 +53,14 @@ my $expected_quote = { > timestamp => '0000-00-00 00:00:00', > }; > >-diag("Get a quote based on id"); > my $quote = GetDailyQuote('id'=>8); >-cmp_ok($quote->{'id'}, '==', $expected_quote->{'id'}, "Id is correct"); >+cmp_ok($quote->{'id'}, '==', $expected_quote->{'id'}, "Correctly got quote by ID"); > is($quote->{'quote'}, $expected_quote->{'quote'}, "Quote is correct"); > >- >-diag("Get a random quote"); > $quote = GetDailyQuote('random'=>1); > ok($quote, "Got a random quote."); > cmp_ok($quote->{'id'}, '>', 0, 'Id is greater than 0'); > >- >-diag("Get a quote based on today's date"); > $dbh->do("UPDATE quotes SET timestamp = '0000-00-00 00:00:00';"); > my $timestamp = DateTime::Format::MySQL->format_datetime(dt_from_string()); > my $query = 'UPDATE quotes SET timestamp = ? WHERE id = ?'; >-- >2.1.4
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 18767
:
64136
|
64139
| 64145