From 5848bedfe6b7c9b47b64fd67268a06eb89cd6f23 Mon Sep 17 00:00:00 2001 From: Indranil Das Gupta Date: Mon, 25 May 2015 05:25:04 +0530 Subject: [PATCH] Bug 14206 - Adds test for getletter() call from overdue_notices.pl MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Adds missing test for getletter() when called from overdue_notices.pl Test plan ========= 1/ apply this patch 2/ run prove -v t/db_dependent/Letters.t all tests should pass, especially test #40 which tests call from overdue_notices.pl Signed-off-by: Marc VĂ©ron Signed-off-by: Jonathan Druart --- t/db_dependent/Letters.t | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/t/db_dependent/Letters.t b/t/db_dependent/Letters.t index 6ac9f58..b549a7b 100644 --- a/t/db_dependent/Letters.t +++ b/t/db_dependent/Letters.t @@ -18,7 +18,7 @@ # along with Koha; if not, see . use Modern::Perl; -use Test::More tests => 60; +use Test::More tests => 61; use Test::MockModule; use Test::Warn; @@ -180,6 +180,15 @@ is( $letter14206_a->{message_transport_type}, 'print', 'Bug 14206 - message_tran my $letter14206_b = C4::Letters::getletter('my module', 'my code', 'FFL', 'print'); is( $letter14206_b->{message_transport_type}, 'print', 'Bug 14206 - message_transport_type passed, correct mtt detected' ); +# test for overdue_notices.pl +my $overdue_rules = { + letter1 => 'my code', +}; +my $i = 1; +my $branchcode = 'FFL'; +my $letter14206_c = C4::Letters::getletter('my module', $overdue_rules->{"letter$i"}, $branchcode); +is( $letter14206_c->{message_transport_type}, 'print', 'Bug 14206 - correct mtt detected for call from overdue_notices.pl' ); + # addalert my $type = 'my type'; my $externalid = 'my external id'; -- 2.1.0