[Koha-bugs] [Bug 12167] datetime type casting issue regarding bug 7567

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Thu Apr 30 16:27:58 CEST 2015


http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12167

M. Tompsett <mtompset at hotmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #31139|0                           |1
        is obsolete|                            |

--- Comment #28 from M. Tompsett <mtompset at hotmail.com> ---
Created attachment 38721
  -->
http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=38721&action=edit
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.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel at gmail.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83 at web.de>
Tested news expiration and publication dates:
- publication date today, expiration date tomorrow: shows
- publication date tomorrow, expiration date later: doesn't show
- publication date yesterday, expiration date today: shows
- publication date some time ago, expiration date yesterday: doesn't show
- publication date today, expiration date empty: shows

Passes all tests and QA script, no problems found.

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list