Bugzilla – Attachment 150401 Details for
Bug 32548
Make illrequestattributes easily available to ILL notices
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 32548: Add tests
Bug-32548-Add-tests.patch (text/plain), 2.01 KB, created by
Nick Clemens (kidclamp)
on 2023-04-28 17:09:38 UTC
(
hide
)
Description:
Bug 32548: Add tests
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2023-04-28 17:09:38 UTC
Size:
2.01 KB
patch
obsolete
>From 16c6362e65151a65e88d5aafe25976d7f0705493 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Fri, 31 Mar 2023 14:11:46 +0200 >Subject: [PATCH] Bug 32548: Add tests > >Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com> >Signed-off-by: Nick Clemens <nick@bywatersolutions.com> >--- > t/db_dependent/Illrequests.t | 20 +++++++++++++++++++- > 1 file changed, 19 insertions(+), 1 deletion(-) > >diff --git a/t/db_dependent/Illrequests.t b/t/db_dependent/Illrequests.t >index 65c1bc6fa5..179333d24a 100755 >--- a/t/db_dependent/Illrequests.t >+++ b/t/db_dependent/Illrequests.t >@@ -1102,6 +1102,24 @@ subtest 'Helpers' => sub { > }); > is($queue->count, 1, "Notice is not queued"); > >+ my $attribute = $builder->build({ >+ source => 'Illrequestattribute', >+ value => { illrequest_id => $illrq_obj->illrequest_id, type => 'pages', value => '42' } >+ }); >+ >+ my $ILL_REQUEST_CANCEL_content = >+ q{The patron for interlibrary loans request [% illrequest.illrequest_id %], with the following details, has requested cancellation of this ILL request: >+ >+[% ill_full_metadata %] >+ >+Attribute: Pages=[% illrequestattributes.pages %] >+}; >+ my $dbh = C4::Context->dbh; >+ $dbh->do(q{UPDATE letter >+ SET content=? >+ WHERE code="ILL_REQUEST_CANCEL" >+ }, undef, $ILL_REQUEST_CANCEL_content); >+ > #get_notice > my $not = $illrq_obj->get_notice({ > notice_code => 'ILL_REQUEST_CANCEL', >@@ -1130,7 +1148,7 @@ subtest 'Helpers' => sub { > $not->{content} =~ s/\s//g; > > is( >- $not->{content},"Thepatronforinterlibraryloansrequest" . $illrq_obj->id . ",withthefollowingdetails,hasrequestedcancellationofthisILLrequest:-author:myauthor-title:mytitle", >+ $not->{content},"Thepatronforinterlibraryloansrequest" . $illrq_obj->id . ",withthefollowingdetails,hasrequestedcancellationofthisILLrequest:-author:myauthor-title:mytitleAttribute:Pages=42", > 'Correct content returned from get_notice with metadata correctly ordered' > ); > >-- >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 32548
:
147157
|
149034
|
149035
|
149064
|
149065
|
149066
|
150400
| 150401 |
150402