Bugzilla – Attachment 96220 Details for
Bug 24164
Patron emailer cronjob is not generating unique content for notices
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 24164: Unit test
Bug-24164-Unit-test.patch (text/plain), 2.00 KB, created by
Jonathan Druart
on 2019-12-12 13:53:30 UTC
(
hide
)
Description:
Bug 24164: Unit test
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2019-12-12 13:53:30 UTC
Size:
2.00 KB
patch
obsolete
>From 84dfe1e95bc8b917bf785f87f3043739f229d64f Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Tue, 3 Dec 2019 19:54:07 +0000 >Subject: [PATCH] Bug 24164: Unit test > >Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >--- > t/db_dependent/Reports/Guided.t | 6 ++++-- > 1 file changed, 4 insertions(+), 2 deletions(-) > >diff --git a/t/db_dependent/Reports/Guided.t b/t/db_dependent/Reports/Guided.t >index 5a8b6fa007..4488d4c5d4 100644 >--- a/t/db_dependent/Reports/Guided.t >+++ b/t/db_dependent/Reports/Guided.t >@@ -361,11 +361,12 @@ count(h.reservedate) AS 'holds' > > subtest 'Email report test' => sub { > >- plan tests => 8; >+ plan tests => 9; > > my $id1 = $builder->build({ source => 'Borrower',value => { surname => 'mailer', email => 'a@b.com' } })->{ borrowernumber }; > my $id2 = $builder->build({ source => 'Borrower',value => { surname => 'nomailer', email => undef } })->{ borrowernumber }; >- my $report1 = $builder->build({ source => 'SavedSql', value => { savedsql => "SELECT surname,borrowernumber,email FROM borrowers WHERE borrowernumber IN ($id1,$id2)" } })->{ id }; >+ my $id3 = $builder->build({ source => 'Borrower',value => { surname => 'norman', email => 'a@b.com' } })->{ borrowernumber }; >+ my $report1 = $builder->build({ source => 'SavedSql', value => { savedsql => "SELECT surname,borrowernumber,email FROM borrowers WHERE borrowernumber IN ($id1,$id2,$id3)" } })->{ id }; > my $report2 = $builder->build({ source => 'SavedSql', value => { savedsql => "SELECT potato FROM mashed" } })->{ id }; > > my $letter1 = $builder->build({ >@@ -408,6 +409,7 @@ subtest 'Email report test' => sub { > > ($emails, $errors ) = C4::Reports::Guided::EmailReport({report_id => $report1, module => $letter1->{module} , code => $letter1->{code}, from => 'the@future.ooh' }); > is( $emails->[0]{letter}->{content}, "mailer", "Message has expected content"); >+ is( $emails->[1]{letter}->{content}, "norman", "Message has expected content"); > > }; > >-- >2.11.0
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 24164
:
95982
|
95983
|
96040
|
96211
| 96220 |
96221