Bugzilla – Attachment 169203 Details for
Bug 23781
Recalls notices and messaging preferences
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 23781: Tests for Recalls messaging preferences
Bug-23781-Tests-for-Recalls-messaging-preferences.patch (text/plain), 2.67 KB, created by
Kyle M Hall (khall)
on 2024-07-19 11:42:32 UTC
(
hide
)
Description:
Bug 23781: Tests for Recalls messaging preferences
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2024-07-19 11:42:32 UTC
Size:
2.67 KB
patch
obsolete
>From 840d3584ed58f8fe46d7d3a58ef89cb2860ece26 Mon Sep 17 00:00:00 2001 >From: Aleisha Amohia <aleishaamohia@hotmail.com> >Date: Sun, 21 Apr 2024 23:12:55 +0000 >Subject: [PATCH] Bug 23781: Tests for Recalls messaging preferences > >- t/db_dependent/Koha/Recall.t >- t/db_dependent/Koha/Recalls.t > >Signed-off-by: David Nind <david@davidnind.com> >Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> >--- > t/db_dependent/Koha/Recall.t | 8 ++++++++ > t/db_dependent/Koha/Recalls.t | 10 +++++++++- > 2 files changed, 17 insertions(+), 1 deletion(-) > >diff --git a/t/db_dependent/Koha/Recall.t b/t/db_dependent/Koha/Recall.t >index 1b4f8f70ebb..4d6eff783e8 100755 >--- a/t/db_dependent/Koha/Recall.t >+++ b/t/db_dependent/Koha/Recall.t >@@ -126,6 +126,14 @@ $expected_expirationdate = dt_from_string->add({ days => 3 }); > $expirationdate = $recall2->calc_expirationdate; > is( t::lib::Dates::compare( $expirationdate, $expected_expirationdate ), 0, "Expiration date calculated based on circulation rules" ); > >+C4::Members::Messaging::SetMessagingPreference( >+ { >+ borrowernumber => $patron1->borrowernumber, >+ message_attribute_id => 12, # Recall_Waiting >+ message_transport_types => [qw( email sms )], >+ } >+); >+ > $recall2->set_waiting({ expirationdate => $expirationdate }); > is( $recall2->waiting, 1, "Recall is waiting" ); > >diff --git a/t/db_dependent/Koha/Recalls.t b/t/db_dependent/Koha/Recalls.t >index 546bbf21c45..ed0193428cc 100755 >--- a/t/db_dependent/Koha/Recalls.t >+++ b/t/db_dependent/Koha/Recalls.t >@@ -68,6 +68,14 @@ Koha::CirculationRules->set_rules({ > C4::Circulation::AddIssue( $patron3, $item1->barcode ); > C4::Circulation::AddIssue( $patron3, $item2->barcode ); > >+C4::Members::Messaging::SetMessagingPreference( >+ { >+ borrowernumber => $patron3->borrowernumber, >+ message_attribute_id => 13, # Recall_Requested >+ message_transport_types => [qw( email sms )], >+ } >+); >+ > my ( $recall, $due_interval, $due_date ) = Koha::Recalls->add_recall({ > patron => undef, > biblio => $biblio1, >@@ -147,7 +155,7 @@ is( > is( t::lib::Dates::compare( $due_date, $expected_due_date ), 0, "Due date correctly returned" ); > > my $messages_count = Koha::Notice::Messages->search({ borrowernumber => $patron3->borrowernumber, letter_code => 'RETURN_RECALLED_ITEM' })->count; >-is( $messages_count, 3, "RETURN_RECALLED_ITEM notice successfully sent to checkout borrower" ); >+is( $messages_count, 6, "RETURN_RECALLED_ITEM notice successfully sent to checkout borrower" ); > > my $message = Koha::Recalls->move_recall; > is( $message, 'no recall_id provided', "Can't move a recall without specifying which recall" ); >-- >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 23781
:
93905
|
104984
|
131702
|
132044
|
140242
|
140244
|
147107
|
148248
|
148260
|
150430
|
150441
|
155346
|
158696
|
158697
|
158698
|
159013
|
159014
|
159015
|
162377
|
162378
|
162379
|
162380
|
165240
|
165241
|
165242
|
165593
|
165614
|
165615
|
165616
|
165617
|
169201
|
169202
| 169203 |
169204
|
169205