@@ -, +, @@ check for GetNewsToDisplay --------- -- all tests should pass -- note the test changes to verify correctly what should be tested for. --- t/db_dependent/NewsChannels.t | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) --- a/t/db_dependent/NewsChannels.t +++ a/t/db_dependent/NewsChannels.t @@ -132,13 +132,13 @@ my ( $opac_news_count, $arrayref_opac_news ) = get_opac_news( 0, q{}, 'LIB1' ); 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 ' . +( $arrayref_opac_news ) = GetNewsToDisplay( q{}, 'LIB1' ); +ok( $arrayref_opac_news, '$arrayref_opac_news is ' . ( defined($arrayref_opac_news) ? - ("Defined as '$arrayref_opac_news'") : "UNDEFINED") + ('Defined') : '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!' ); +ok( ref $arrayref_opac_news eq 'ARRAY', + '$arrayref_opac_news is an array reference.' ); +ok( (scalar @$arrayref_opac_news) >= 2, 'Successfully tested GetNewsToDisplay for LIB1!' ); $dbh->rollback; --