Bugzilla – Attachment 24575 Details for
Bug 9016
Multi transport types for notices
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 9016: Fix unit tests
Bug-9016-Fix-unit-tests.patch (text/plain), 2.44 KB, created by
Jonathan Druart
on 2014-01-20 10:00:58 UTC
(
hide
)
Description:
Bug 9016: Fix unit tests
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2014-01-20 10:00:58 UTC
Size:
2.44 KB
patch
obsolete
>From 2f2420c90b6ea0a0e26956abc751a5ba678142e6 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@biblibre.com> >Date: Fri, 8 Nov 2013 13:40:07 +0100 >Subject: [PATCH] Bug 9016: Fix unit tests > >The unit tests should insert overdue rules. >+ Fix the doc for GetOverdueMessageTransportTypes > >Signed-off-by: Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi> >--- > C4/Overdues.pm | 2 +- > t/db_dependent/Overdues.t | 11 ++++++++++- > 2 files changed, 11 insertions(+), 2 deletions(-) > >diff --git a/C4/Overdues.pm b/C4/Overdues.pm >index 9e60ece..8c0a5ec 100644 >--- a/C4/Overdues.pm >+++ b/C4/Overdues.pm >@@ -910,7 +910,7 @@ sub RemoveNotifyLine { > > my $message_transport_types = GetOverdueMessageTransportTypes( $branchcode, $categorycode, $letternumber); > >- return a arrayref with message_transport_type for given branchcode, categorycode and letternumber(1,2 or 3) >+ return a arrayref with all message_transport_type for given branchcode, categorycode and letternumber(1,2 or 3) > > =cut > sub GetOverdueMessageTransportTypes { >diff --git a/t/db_dependent/Overdues.t b/t/db_dependent/Overdues.t >index 2725565..b023cfd 100644 >--- a/t/db_dependent/Overdues.t >+++ b/t/db_dependent/Overdues.t >@@ -14,6 +14,7 @@ $dbh->{RaiseError} = 1; > $dbh->do(q|DELETE FROM letter|); > $dbh->do(q|DELETE FROM message_queue|); > $dbh->do(q|DELETE FROM message_transport_types|); >+$dbh->do(q|DELETE FROM overduerules|); > $dbh->do(q|DELETE FROM overduerules_transport_types|); > > $dbh->do(q| >@@ -21,6 +22,14 @@ $dbh->do(q| > |); > > $dbh->do(q| >+ INSERT INTO overduerules ( branchcode, categorycode ) VALUES >+ ('CPL', 'PT'), >+ ('CPL', 'YA'), >+ ('', 'PT'), >+ ('', 'YA') >+|); >+ >+$dbh->do(q| > INSERT INTO overduerules_transport_types( branchcode, categorycode, letternumber, message_transport_type ) VALUES > ('CPL', 'PT', 1, 'email'), > ('CPL', 'PT', 2, 'sms'), >@@ -53,7 +62,7 @@ is_deeply( $mtts, ['sms'], 'GetOverdueMessageTransportTypes: second overdue is b > $mtts = C4::Overdues::GetOverdueMessageTransportTypes('CPL', 'PT', 3); > is_deeply( $mtts, ['email'], 'GetOverdueMessageTransportTypes: third overdue is by email for PT (CPL)' ); > >-my $mtts = C4::Overdues::GetOverdueMessageTransportTypes('', 'PT', 1); >+$mtts = C4::Overdues::GetOverdueMessageTransportTypes('', 'PT', 1); > is_deeply( $mtts, ['email'], 'GetOverdueMessageTransportTypes: first overdue is by email for PT (default)' ); > > $mtts = C4::Overdues::GetOverdueMessageTransportTypes('', 'PT', 2); >-- >1.7.10.4
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 9016
:
13276
|
20814
|
20815
|
20816
|
20916
|
21164
|
21165
|
21166
|
21167
|
21636
|
21637
|
21638
|
21639
|
22814
|
23272
|
23273
|
23289
|
23290
|
23291
|
23292
|
23293
|
23562
|
23955
|
23956
|
23957
|
23958
|
23959
|
23960
|
24571
|
24572
|
24573
|
24574
|
24575
|
24576
|
25006
|
25123
|
25124
|
25125
|
25126
|
25127
|
25128
|
25129
|
25130
|
25415
|
25416
|
25417
|
25418
|
25419
|
25420
|
25421
|
25422
|
25606
|
25899
|
26182
|
26209
|
26210
|
26211
|
26216
|
26226
|
26233
|
26648
|
26649
|
26650
|
26656
|
26657
|
26658
|
26659
|
26660
|
26661
|
26662
|
26663
|
26664
|
26665
|
26666
|
26667
|
26668
|
26670
|
26672
|
26673
|
27794
|
27795
|
27796
|
27797
|
27798
|
27799
|
27800
|
27801
|
27802
|
27803
|
27804
|
27805
|
27806
|
27807
|
27808
|
27809