From bb86b74d186d7ea9652527f7c7db24f96b08878f 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=utf8 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 Signed-off-by: Tomas Cohen Arazi (cherry picked from commit c07f83f643e6b8820d90487a23e91e9b062a5cd6) Signed-off-by: Chris Cormack --- 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 6ac9f584f5..b549a7bf72 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.39.5