Bugzilla – Attachment 144231 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.62 KB, created by
Martin Renvoize (ashimema)
on 2022-11-25 08:32:21 UTC
(
hide
)
Description:
Bug 32304: Fix subtest search_limited
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2022-11-25 08:32:21 UTC
Size:
1.62 KB
patch
obsolete
>From 191f0555a3f902979b73eb914ca0f62c0bcc8783 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 > >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> >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > 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.20.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 32304
:
144108
|
144227
|
144228
| 144231 |
144232