View | Details | Raw Unified | Return to bug 14206
Collapse All | Expand All

(-)a/t/db_dependent/Letters.t (-2 / +7 lines)
Lines 18-24 Link Here
18
# along with Koha; if not, see <http://www.gnu.org/licenses>.
18
# along with Koha; if not, see <http://www.gnu.org/licenses>.
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
use Test::More tests => 58;
21
use Test::More tests => 60;
22
use Test::MockModule;
22
use Test::MockModule;
23
use Test::Warn;
23
use Test::Warn;
24
24
Lines 173-178 is( $letter->{title}, $title, 'GetLetters gets the title correctly' ); Link Here
173
is( $letter->{content}, $content, 'GetLetters gets the content correctly' );
173
is( $letter->{content}, $content, 'GetLetters gets the content correctly' );
174
is( $letter->{message_transport_type}, 'email', 'GetLetters gets the message type correctly' );
174
is( $letter->{message_transport_type}, 'email', 'GetLetters gets the message type correctly' );
175
175
176
# Regression test for Bug 14206
177
$dbh->do( q|INSERT INTO letter(branchcode,module,code,name,is_html,title,content,message_transport_type) VALUES ('CPL','my module','my code','my name',1,?,?,'print')|, undef, $title, $content );
178
my $letter14206_a = C4::Letters::getletter('my module', 'my code', 'CPL' );
179
is( $letter14206_a->{message_transport_type}, 'email', 'Bug 14206 - returns default message_transport_type' );
180
my $letter14206_b = C4::Letters::getletter('my module', 'my code', 'CPL', $mtts );
181
is( $letter14206_b->{message_transport_type}, 'print', 'Bug 14206 - returns actual message_transport_type'  );
176
182
177
# addalert
183
# addalert
178
my $type = 'my type';
184
my $type = 'my type';
179
- 

Return to bug 14206