From 1d0cc7f00c339e2d8a73f08bdff6d650a5fe3ac4 Mon Sep 17 00:00:00 2001 From: Tomas Cohen Arazi Date: Mon, 16 Sep 2019 10:32:48 -0300 Subject: [PATCH] Bug 23517: (follow-up) More test cases Signed-off-by: Tomas Cohen Arazi Signed-off-by: Josef Moravec Signed-off-by: Liz Rea --- t/db_dependent/api/v1/holds.t | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/t/db_dependent/api/v1/holds.t b/t/db_dependent/api/v1/holds.t index 9bbe6c4d94..b0a5a191a7 100644 --- a/t/db_dependent/api/v1/holds.t +++ b/t/db_dependent/api/v1/holds.t @@ -348,7 +348,7 @@ subtest 'suspend and resume tests' => sub { subtest 'PUT /holds/{hold_id}/priority tests' => sub { - plan tests => 8; + plan tests => 14; $schema->storage->txn_begin; @@ -429,5 +429,13 @@ subtest 'PUT /holds/{hold_id}/priority tests' => sub { is( $hold_2->discard_changes->priority, 3, 'Priority adjusted correctly' ); is( $hold_3->discard_changes->priority, 1, 'Priority adjusted correctly' ); + $t->put_ok( "//$userid:$password@/api/v1/holds/" + . $hold_3->id + . "/priority" => json => 3 )->status_is(200)->json_is(3); + + is( $hold_1->discard_changes->priority, 1, 'Priority adjusted correctly' ); + is( $hold_2->discard_changes->priority, 2, 'Priority adjusted correctly' ); + is( $hold_3->discard_changes->priority, 3, 'Priority adjusted correctly' ); + $schema->storage->txn_rollback; }; -- 2.11.0