Bugzilla – Attachment 152183 Details for
Bug 33852
jobs.t is not testing only_current
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 33852: Add one more test
Bug-33852-Add-one-more-test.patch (text/plain), 1.96 KB, created by
Jonathan Druart
on 2023-06-08 12:35:18 UTC
(
hide
)
Description:
Bug 33852: Add one more test
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2023-06-08 12:35:18 UTC
Size:
1.96 KB
patch
obsolete
>From 625b1ddc5fe2cbb8d909bd7020f9571bcfbe1710 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Thu, 8 Jun 2023 14:32:53 +0200 >Subject: [PATCH] Bug 33852: Add one more test > >Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >--- > t/db_dependent/api/v1/jobs.t | 23 +++++++++++++++++++++-- > 1 file changed, 21 insertions(+), 2 deletions(-) > >diff --git a/t/db_dependent/api/v1/jobs.t b/t/db_dependent/api/v1/jobs.t >index cba230d073b..1095d94d806 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 => 28; >+use Test::More tests => 31; > use Test::Mojo; > > use t::lib::TestBuilder; >@@ -85,9 +85,28 @@ my $job = $builder->build_object( > } > ); > >+my $job_current = $builder->build_object( >+ { >+ class => 'Koha::BackgroundJobs', >+ value => { >+ status => 'new', >+ progress => 100, >+ size => 100, >+ borrowernumber => $patron->borrowernumber, >+ type => 'batch_item_record_modification', >+ queue => 'default', >+ #data => '{"record_ids":["1"],"regex_mod":null,"exclude_from_local_holds_priority":null,"new_values":{"itemnotes":"xxx"}}' , >+ data => '{"regex_mod":null,"report":{"total_records":1,"modified_fields":1,"modified_itemnumbers":[1]},"new_values":{"itemnotes":"xxx"},"record_ids":["1"],"exclude_from_local_holds_priority":null}', >+ } >+ } >+); >+ > { > $t->get_ok("//$superlibrarian_userid:$password@/api/v1/jobs") >- ->status_is(200)->json_is( [ $job->to_api ] ); >+ ->status_is(200)->json_is( [ $job->to_api, $job_current->to_api ] ); >+ >+ $t->get_ok("//$superlibrarian_userid:$password@/api/v1/jobs?only_current=1") >+ ->status_is(200)->json_is( [ $job_current->to_api ] ); > > $t->get_ok("//$librarian_userid:$password@/api/v1/jobs") > ->status_is(200)->json_is( [] ); >-- >2.25.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 33852
:
151774
|
151822
|
152182
| 152183