From 619eca1c7aaebf4db6ed170a3cbd14065da79c9d Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Tue, 24 Apr 2018 15:53:02 -0300 Subject: [PATCH] Bug 20592: Add tests NOTE: It isn't really a test, but it does trigger the return line which was added to ModItem. Signed-off-by: Mark Tompsett Signed-off-by: Jonathan Druart Signed-off-by: Nick Clemens --- t/db_dependent/Items.t | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/t/db_dependent/Items.t b/t/db_dependent/Items.t index d8734f4eb3..3ccd38ee5d 100755 --- a/t/db_dependent/Items.t +++ b/t/db_dependent/Items.t @@ -70,6 +70,12 @@ subtest 'General Add, Get and Del tests' => sub { is( $getitem->{location}, $location, "The location should not have been modified" ); is( $getitem->{permanent_location}, $location, "The permanent_location should have been set to the location value" ); + + # Do not modify anything, and do not explode! + my $dbh = C4::Context->dbh; + local $dbh->{RaiseError} = 1; + ModItem({}, $bibnum, $itemnumber); + # Modify item; setting barcode. ModItem({ barcode => '987654321' }, $bibnum, $itemnumber); my $moditem = GetItem($itemnumber); -- 2.39.2