From 9e8657aba7d7f742e2cc2bdf98a55252c021890e Mon Sep 17 00:00:00 2001 From: Tomas Cohen Arazi Date: Mon, 18 Mar 2024 12:48:55 -0300 Subject: [PATCH] Bug 35129: Regression tests Signed-off-by: Tomas Cohen Arazi Signed-off-by: Laura Escamilla Signed-off-by: Nick Clemens Signed-off-by: Katrin Fischer (cherry picked from commit 9a4e3bd49f1a978fbe5d3dc88e36dc5de0fb81f9) Signed-off-by: Fridolin Somers --- t/db_dependent/api/v1/pagination.t | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/t/db_dependent/api/v1/pagination.t b/t/db_dependent/api/v1/pagination.t index 9800259ce7..fd6ab5479e 100755 --- a/t/db_dependent/api/v1/pagination.t +++ b/t/db_dependent/api/v1/pagination.t @@ -34,7 +34,7 @@ t::lib::Mocks::mock_preference( 'RESTBasicAuth', 1 ); subtest 'list() pagination tests' => sub { - plan tests => 66; + plan tests => 69; $schema->storage->txn_begin; @@ -186,5 +186,12 @@ subtest 'list() pagination tests' => sub { is( scalar @{$cities}, 10, '10 cities retrieved, -1 means all' ); + $t->get_ok("//$userid:$password@/api/v1/cities?_per_page=0")->status_is(400)->json_is( + '/0' => { + message => 'Invalid value: 0', + path => '/query/_per_page' + } + ); + $schema->storage->txn_rollback; }; -- 2.39.5