From a6b13fbcb315d3749da23d494c11e4b6f9e70165 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Sat, 21 Jan 2017 10:49:40 +0100 Subject: [PATCH] Bug 17960: Add a test to highlight the issue With only this patch applied, proving t/db_dependent/Koha/News.t will return "Attempt to bless into a reference at /home/vagrant/kohaclone/Koha/Object.pm line 78." Signed-off-by: Josef Moravec Signed-off-by: Nick Clemens Signed-off-by: Kyle M Hall --- t/db_dependent/Koha/News.t | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/t/db_dependent/Koha/News.t b/t/db_dependent/Koha/News.t index 8061bdeff2..09095b4f49 100644 --- a/t/db_dependent/Koha/News.t +++ b/t/db_dependent/Koha/News.t @@ -19,7 +19,7 @@ use Modern::Perl; -use Test::More tests => 4; +use Test::More tests => 5; use Koha::NewsItem; use Koha::News; @@ -47,6 +47,7 @@ is( Koha::News->search->count, $nb_of_news + 2, 'The 2 news should have been add my $retrieved_news_item_1 = Koha::News->find( $new_news_item_1->idnew ); is( $retrieved_news_item_1->title, $new_news_item_1->title, 'Find a news_item by id should return the correct news_item' ); +is( $retrieved_news_item_1->new, $new_news_item_1->new, 'This test is failing because ->new is not a valid accessor'); $retrieved_news_item_1->delete; is( Koha::News->search->count, $nb_of_news + 1, 'Delete should have deleted the news_item' ); -- 2.39.5