From 7b825c7028d68079f1345ae4611b54b2a582b3e2 Mon Sep 17 00:00:00 2001 From: Tomas Cohen Arazi Date: Mon, 29 May 2023 10:30:06 -0300 Subject: [PATCH] Bug 33852: Make jobs.t test the only_current parameter This trivial patch adds a test to the only_current parameter. To test: 1. Apply this patch 2. Run: $ ktd --shell k$ prove t/db_dependent/api/v1/jobs.t => SUCCESS: New tests added, and pass 3. Sign off :-D Signed-off-by: Sam Lau Signed-off-by: Jonathan Druart Signed-off-by: Tomas Cohen Arazi (cherry picked from commit 76983f5275edc9df8f41c4c62f20827c822cc344) Signed-off-by: Martin Renvoize (cherry picked from commit 8a5665d4b755b5a56ffb028cf3cc18832b598a37) Signed-off-by: Matt Blenkinsop --- t/db_dependent/api/v1/jobs.t | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/t/db_dependent/api/v1/jobs.t b/t/db_dependent/api/v1/jobs.t index 4d993c68e0..cba230d073 100755 --- a/t/db_dependent/api/v1/jobs.t +++ b/t/db_dependent/api/v1/jobs.t @@ -17,7 +17,7 @@ use Modern::Perl; -use Test::More tests => 25; +use Test::More tests => 28; use Test::Mojo; use t::lib::TestBuilder; @@ -99,6 +99,9 @@ my $job = $builder->build_object( $t->get_ok("//$librarian_userid:$password@/api/v1/jobs") ->status_is(200)->json_is( [ $job->to_api ] ); + + $t->get_ok("//$librarian_userid:$password@/api/v1/jobs?only_current=1") + ->status_is(200)->json_is( [] ); } { -- 2.39.2