Bug 14206: Adds test for getletter() call from overdue_notices.pl

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 <veron@veron.ch>

Signed-off-by: Jonathan Druart <jonathan.druart@koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
This commit is contained in:
Indranil Das Gupta 2015-05-25 05:25:04 +05:30 committed by Tomas Cohen Arazi
parent 8895caa339
commit c07f83f643

View file

@ -18,7 +18,7 @@
# along with Koha; if not, see <http://www.gnu.org/licenses>.
use Modern::Perl;
use Test::More tests => 60;
use Test::More tests => 61;
use Test::MockModule;
use Test::Warn;
@ -184,6 +184,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';