Bugzilla – Attachment 144227 Details for
Bug 32304
Fix subtest search_limited and purge in BackgroundJobs.t
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 32304: Fix subtest search_limited
Bug-32304-Fix-subtest-searchlimited.patch (text/plain), 1.60 KB, created by
Marcel de Rooy
on 2022-11-25 08:20:01 UTC
(
hide
)
Description:
Bug 32304: Fix subtest search_limited
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2022-11-25 08:20:01 UTC
Size:
1.60 KB
patch
obsolete
>From d0efb9b002ca23466b6c6149ce07ec02ea5b39ad Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Fri, 25 Nov 2022 08:13:04 +0000 >Subject: [PATCH] Bug 32304: Fix subtest search_limited >Content-Type: text/plain; charset=utf-8 > >Jenkins reported: > not ok 1 - No jobs found without userenv > >We need to check if there are jobs without borrowernumber. > >Test plan: >Run test again. > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > t/db_dependent/Koha/BackgroundJobs.t | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > >diff --git a/t/db_dependent/Koha/BackgroundJobs.t b/t/db_dependent/Koha/BackgroundJobs.t >index ed4fd8d9fb..158565df4c 100755 >--- a/t/db_dependent/Koha/BackgroundJobs.t >+++ b/t/db_dependent/Koha/BackgroundJobs.t >@@ -131,8 +131,10 @@ subtest 'search_limited' => sub { > my $patron2 = $builder->build_object( { class => 'Koha::Patrons', value => { flags => 0 } } ); > my $job1 = $builder->build_object( { class => 'Koha::BackgroundJobs', value => { borrowernumber => $patron1->id } } ); > >+ my $cnt = Koha::BackgroundJobs->search({ borrowernumber => undef })->count; # expected to be zero, but theoretically possible >+ > C4::Context->set_userenv( undef, q{} ); >- is( Koha::BackgroundJobs->search_limited->count, 0, 'No jobs found without userenv' ); >+ is( Koha::BackgroundJobs->search_limited->count, $cnt, 'No jobs found without userenv' ); > C4::Context->set_userenv( $patron1->id, $patron1->userid ); > is( Koha::BackgroundJobs->search_limited->count, 1, 'My job found' ); > C4::Context->set_userenv( $patron2->id, $patron2->userid ); >-- >2.30.2
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 32304
:
144108
|
144227
|
144228
|
144231
|
144232