Bugzilla – Attachment 30174 Details for
Bug 12167
datetime type casting issue regarding bug 7567
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 12167 - Invalid results check for opac_news test
Bug-12167---Invalid-results-check-for-opacnews-tes.patch (text/plain), 1.95 KB, created by
Mark Tompsett
on 2014-07-28 01:55:19 UTC
(
hide
)
Description:
Bug 12167 - Invalid results check for opac_news test
Filename:
MIME Type:
Creator:
Mark Tompsett
Created:
2014-07-28 01:55:19 UTC
Size:
1.95 KB
patch
obsolete
>From 877e79eebd09762b63079458a2856eac7531cc97 Mon Sep 17 00:00:00 2001 >From: Mark Tompsett <mtompset@hotmail.com> >Date: Sun, 27 Jul 2014 21:01:29 -0400 >Subject: [PATCH] Bug 12167 - Invalid results check for opac_news test > >C4/NewsChannels.pm has a function GetNewsToDisplay at the end >of the file. It returns an array reference (i.e. one result). >t/db_dependent/NewsChannels.t has a test which expects two >values. This is likely a cut and paste error on my part. >Notice get_opac_news returns an array of two things. > >TEST PLAN >--------- >1) prove -v t/db_dependent/NewsChannels.t > -- magically the wrong condition still passes. >2) apply this first patch only. >3) prove -v t/db_dependent/NewsChannels.t > -- notice the second result value is UNDEFINED. > -- notice the first result is an array reference. > -- and the last test passes, because unless somehow the > array reference was less than 2, it will pass. >--- > t/db_dependent/NewsChannels.t | 8 +++++++- > 1 file changed, 7 insertions(+), 1 deletion(-) > >diff --git a/t/db_dependent/NewsChannels.t b/t/db_dependent/NewsChannels.t >index f0a86e0..a70bc3f 100644 >--- a/t/db_dependent/NewsChannels.t >+++ b/t/db_dependent/NewsChannels.t >@@ -3,7 +3,7 @@ > use Modern::Perl; > use C4::Dates qw(format_date); > use C4::Branch qw(GetBranchName); >-use Test::More tests => 10; >+use Test::More tests => 12; > > BEGIN { > use_ok('C4::NewsChannels'); >@@ -133,6 +133,12 @@ ok( $opac_news_count >= 2, 'Successfully tested get_opac_news for LIB1!' ); > > # Test GetNewsToDisplay > ( $opac_news_count, $arrayref_opac_news ) = GetNewsToDisplay( q{}, 'LIB1' ); >+ok( !$arrayref_opac_news, 'Second parameter is ' . >+ ( defined($arrayref_opac_news) ? >+ ("Defined as '$arrayref_opac_news'") : "UNDEFINED") >+ ); >+ok ( ref $opac_news_count eq 'ARRAY', >+ '$opac_news_count is an array reference'); > ok( $opac_news_count >= 2, 'Successfully tested GetNewsToDisplay for LIB1!' ); > > $dbh->rollback; >-- >1.7.9.5
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 12167
:
27825
|
27826
|
30171
|
30172
|
30173
|
30174
|
30175
|
30176
|
30599
|
30600
|
30601
|
30642
|
30663
|
30882
|
30883
|
30884
|
30885
|
31139
|
38721
|
38722
|
38723
|
38724