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 <samalau@gmail.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 76983f5275)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This commit is contained in:
Tomás Cohen Arazi 2023-05-29 10:30:06 -03:00 committed by Martin Renvoize
parent 4effe3b3d8
commit 8a5665d4b7
Signed by: martin.renvoize
GPG key ID: 422B469130441A0F

View file

@ -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( [] );
}
{