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 <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
use Modern::Perl;
-use Test::More tests => 4;
+use Test::More tests => 5;
use Koha::NewsItem;
use Koha::News;
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' );