From f59bec522741e019fce7802570f59d49db431974 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Wed, 19 Jun 2019 20:12:14 -0500 Subject: [PATCH] Bug 23083: Add tests Content-Type: text/plain; charset=utf-8 Signed-off-by: Martin Renvoize Signed-off-by: Marcel de Rooy --- t/db_dependent/CourseReserves/CourseItems.t | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/t/db_dependent/CourseReserves/CourseItems.t b/t/db_dependent/CourseReserves/CourseItems.t index 4d985f96d1..aca171571c 100644 --- a/t/db_dependent/CourseReserves/CourseItems.t +++ b/t/db_dependent/CourseReserves/CourseItems.t @@ -23,7 +23,7 @@ use C4::CourseReserves qw/ModCourseItem ModCourseReserve DelCourseReserve GetCou use C4::Context; use Koha::Items; -use Test::More tests => 27; +use Test::More tests => 28; BEGIN { require_ok('C4::CourseReserves'); @@ -148,7 +148,17 @@ ModCourseReserve( ); $item = Koha::Items->find($itemnumber); -is($item->ccode, 'DVD', 'Item ccode should be BOOK'); +is($item->ccode, 'DVD', 'Item ccode should be DVD'); + +ModCourseItem( + itemnumber => $itemnumber, + itype => 'BK', + ccode => 'BOOK', + holdingbranch => '', # LEAVE UNCHANGED + location => 'TH', +); +$item = Koha::Items->find($itemnumber); +is($item->ccode, 'BOOK', 'Item ccode should be BOOK'); $course_item2 = GetCourseItem( ci_id => $ci_id2 ); is($course_item2->{ccode}, '', 'Course item ccode should be empty'); -- 2.11.0