From bec4956cf28830d2a1e1e16d641d9933adb6f08d Mon Sep 17 00:00:00 2001 From: Lari Taskula Date: Mon, 3 Jul 2017 17:51:10 +0300 Subject: [PATCH] Bug 18890: Fix holds.t The update also causes some tests authorization tests to fail with HTTP 400 response instead of the expected 401/403. It seems that the parameters were not properly validated before and the tests were mistakenly passing. To test: 1. prove t/db_dependent/api/v1/holds.t Signed-off-by: Mark Tompsett --- t/db_dependent/api/v1/holds.t | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/t/db_dependent/api/v1/holds.t b/t/db_dependent/api/v1/holds.t index 05603be..96c452b 100644 --- a/t/db_dependent/api/v1/holds.t +++ b/t/db_dependent/api/v1/holds.t @@ -161,9 +161,9 @@ subtest "Test endpoints without authentication" => sub { plan tests => 8; $t->get_ok('/api/v1/holds') ->status_is(401); - $t->post_ok('/api/v1/holds') + $t->post_ok('/api/v1/holds' => json => $post_data) ->status_is(401); - $t->put_ok('/api/v1/holds/0') + $t->put_ok('/api/v1/holds/0' => json => $put_data) ->status_is(401); $t->delete_ok('/api/v1/holds/0') ->status_is(401); -- 2.1.4