From e3d5983fd66f6a59c95fdde9091a2eb459c9aff3 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Tue, 27 Mar 2018 14:09:54 -0300 Subject: [PATCH] Bug 18382: Add a test This is what I am expecting but I may be wrong. --- t/db_dependent/Hold.t | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/t/db_dependent/Hold.t b/t/db_dependent/Hold.t index 7eb04abd5e..1ec5d04245 100755 --- a/t/db_dependent/Hold.t +++ b/t/db_dependent/Hold.t @@ -29,7 +29,7 @@ use Koha::Item; use Koha::DateUtils; use t::lib::TestBuilder; -use Test::More tests => 31; +use Test::More tests => 33; use Test::Warn; use_ok('Koha::Hold'); @@ -92,6 +92,9 @@ $hold->suspend_hold( $dt ); $dt->truncate( to => 'day' ); is( $hold->suspend, 1, "Hold is suspended" ); is( $hold->suspend_until, "$dt", "Hold is suspended with a date, truncation takes place automatically" ); +$hold->suspend_hold; +is( $hold->suspend, 1, "Hold is suspended" ); +is( $hold->suspend_until, undef, "Hold is suspended without a date" ); $hold->resume(); is( $hold->suspend, 0, "Hold is not suspended" ); is( $hold->suspend_until, undef, "Hold no longer has suspend_until date" ); -- 2.11.0