From 946a7d5776eba4e8722891b9711777355f53dd96 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Thu, 20 Jan 2022 12:34:26 +0100 Subject: [PATCH] Bug 29906: Add test --- t/db_dependent/api/v1/holds.t | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/t/db_dependent/api/v1/holds.t b/t/db_dependent/api/v1/holds.t index abf23d4fca4..a9b1765470d 100755 --- a/t/db_dependent/api/v1/holds.t +++ b/t/db_dependent/api/v1/holds.t @@ -892,7 +892,7 @@ subtest 'pickup_locations() tests' => sub { subtest 'edit() tests' => sub { - plan tests => 37; + plan tests => 38; $schema->storage->txn_begin; @@ -1061,7 +1061,16 @@ subtest 'edit() tests' => sub { $item_hold->discard_changes; is( $item_hold->branchcode, $library_2->id, 'Pickup location changed correctly' ); + $t->put_ok( "//$userid:$password@/api/v1/holds/" + . $item_hold->id + => json => { %$item_hold_data, suspended_until => undef } ) + ->status_is(200); + + $item_hold->discard_changes; + is( $item_hold->suspend_until, undef, 'suspended_until can be set to undef' ); + $schema->storage->txn_rollback; + }; subtest 'add() tests' => sub { -- 2.25.1