From 3ca7a4d8603c565d1b205c83ab8bb9716ac9da22 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 --- 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 c7ec7f8..d586730 100644 --- a/t/db_dependent/api/v1/holds.t +++ b/t/db_dependent/api/v1/holds.t @@ -146,9 +146,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.7.4