From a961ea97fcf0009e2a9a088973f2b214515efe27 Mon Sep 17 00:00:00 2001 From: Tomas Cohen Arazi Date: Mon, 21 Oct 2019 16:20:54 -0300 Subject: [PATCH] Bug 23860: Regression tests Signed-off-by: Tomas Cohen Arazi Signed-off-by: Martin Renvoize --- t/db_dependent/api/v1/patrons.t | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/t/db_dependent/api/v1/patrons.t b/t/db_dependent/api/v1/patrons.t index f9b60bc4ac..6e31319228 100644 --- a/t/db_dependent/api/v1/patrons.t +++ b/t/db_dependent/api/v1/patrons.t @@ -134,7 +134,7 @@ subtest 'add() tests' => sub { $schema->storage->txn_rollback; subtest 'librarian access tests' => sub { - plan tests => 20; + plan tests => 21; $schema->storage->txn_begin; @@ -197,6 +197,10 @@ subtest 'add() tests' => sub { $tx->req->cookies({ name => 'CGISESSID', value => $session_id }); $t->request_ok($tx) ->status_is(201, 'Patron created successfully') + ->header_like( + Location => qr|^\/api\/v1\/patrons/\d*|, + 'SWAGGER3.4.1' + ) ->json_has('/patron_id', 'got a patron_id') ->json_is( '/cardnumber' => $newpatron->{ cardnumber }) ->json_is( '/surname' => $newpatron->{ surname }) -- 2.20.1