Bug 17089: [QA Follow-up] Add some test descriptions to Ratings.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
This commit is contained in:
Marcel de Rooy 2016-08-12 10:12:18 +02:00 committed by Kyle M Hall
parent 09d00bf040
commit f6bf8c55a4

View file

@ -37,11 +37,11 @@ my $biblionumber = $biblio_1->{biblionumber};
my $rating_1 = Koha::Rating->new( { biblionumber => $biblionumber, borrowernumber => $patron_1->{borrowernumber}, rating_value => 3 } )->store;
my $rating_2 = Koha::Rating->new( { biblionumber => $biblionumber, borrowernumber => $patron_2->{borrowernumber}, rating_value => 4 } )->store;
is( Koha::Ratings->search( { biblionumber => $biblionumber } )->get_avg_rating, 3.5, );
is( Koha::Ratings->search( { biblionumber => $biblionumber } )->get_avg_rating, 3.5, 'get_avg_rating is 3.5' );
$rating_1->rating_value(5)->store;
is( Koha::Ratings->search( { biblionumber => $biblionumber } )->get_avg_rating, 4.5, );
is( Koha::Ratings->search( { biblionumber => $biblionumber } )->get_avg_rating, 4.5, 'get_avg_rating now up to 4.5' );
$rating_1->rating_value(42)->store;
is( Koha::Ratings->find( { biblionumber => $biblionumber, borrowernumber => $patron_1->{borrowernumber} } )->rating_value,