Bugzilla – Attachment 182858 Details for
Bug 39875
ILL - History check fails if unauthenticated request
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 39875: Add tests
Bug-39875-Add-tests.patch (text/plain), 1.72 KB, created by
Pedro Amorim
on 2025-05-30 13:12:21 UTC
(
hide
)
Description:
Bug 39875: Add tests
Filename:
MIME Type:
Creator:
Pedro Amorim
Created:
2025-05-30 13:12:21 UTC
Size:
1.72 KB
patch
obsolete
>From 86283f9969553c68bfb3c55f16a521ea128291bf Mon Sep 17 00:00:00 2001 >From: Pedro Amorim <pedro.amorim@openfifth.co.uk> >Date: Mon, 12 May 2025 13:29:23 +0000 >Subject: [PATCH] Bug 39875: Add tests > >Signed-off-by: David Nind <david@davidnind.com> >Signed-off-by: Lin Wei Li <lin-wei.li@inLibro.com> >--- > .../Koha/ILL/Request/Workflow/HistoryCheck.t | 18 +++++++++++++++++- > 1 file changed, 17 insertions(+), 1 deletion(-) > >diff --git a/t/db_dependent/Koha/ILL/Request/Workflow/HistoryCheck.t b/t/db_dependent/Koha/ILL/Request/Workflow/HistoryCheck.t >index 12796830b0b..0bbcf315398 100755 >--- a/t/db_dependent/Koha/ILL/Request/Workflow/HistoryCheck.t >+++ b/t/db_dependent/Koha/ILL/Request/Workflow/HistoryCheck.t >@@ -35,7 +35,7 @@ my $isbn = '321321321'; > > subtest 'show_history_check' => sub { > >- plan tests => 6; >+ plan tests => 7; > > $schema->storage->txn_begin; > >@@ -103,6 +103,22 @@ subtest 'show_history_check' => sub { > 1, 'Request with ISBN ' . $isbn . ' exists, syspref is on and is same patron. Able to show history check screen' > ); > >+ my $metadata_with_no_cardnumber = { >+ title => 'This is a title', >+ author => 'This is an author', >+ isbn => $isbn, >+ }; >+ >+ my $ill_request_with_no_borrowernumber = $builder->build_sample_ill_request( { borrowernumber => undef } ); >+ >+ my $new_opac_history_check = >+ Koha::ILL::Request::Workflow::HistoryCheck->new( $metadata_with_no_cardnumber, 'staff' ); >+ >+ is( >+ $new_opac_history_check->show_history_check($ill_request_with_no_borrowernumber), >+ 0, 'Don\'t show history check for unauthenticated requests' >+ ); >+ > # Mock ILLHistoryCheck disabled > t::lib::Mocks::mock_preference( 'ILLHistoryCheck', 0 ); > >-- >2.39.5
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 39875
:
182273
|
182274
|
182291
|
182292
|
182295
|
182296
|
182858
|
182859
|
183051
|
183052
|
183065