summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authoreinhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46>2008-11-14 01:53:25 +0000
committereinhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46>2008-11-14 01:53:25 +0000
commitdb6d65ea85fb62d3399ec073ecb2fb88eb097567 (patch)
tree67d66fdd85593c10902ec8f2ef4397e85796f6b8 /t
parenta1bbbd1ce60833fc44abce9d9a20ea2e3fc28ce1 (diff)
Correcting check printing, adding appropriate test cases
git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/trunk@2398 4979c152-3d1c-0410-bac9-87ea11338e46
Diffstat (limited to 't')
-rw-r--r--t/04-template-handling.t14
1 files changed, 14 insertions, 0 deletions
diff --git a/t/04-template-handling.t b/t/04-template-handling.t
index 704969c6..7043f53f 100644
--- a/t/04-template-handling.t
+++ b/t/04-template-handling.t
@@ -421,6 +421,20 @@ is(grep (/value="1" selected/, @output), 0, 'Select box Value 1 unselected');
is(grep (/value="1000" selected/, @output), 1, 'Select box Value 1000 selected');
is(grep (/<td class="description">dtest1/, @output), 1, 'Contact description shows');
+# LPR PRinting Tests
+use LedgerSMB::Sysconfig;
+%LedgerSMB::Sysconfig::printer = ('test' => 'cat > t/var/04-lpr-test');
+
+$template = new LedgerSMB::Template('user' => $myconfig, 'format' => 'PDF',
+ 'template' => '04-template', 'locale' => $locale, no_auto_output => 1);
+$template->render({media => 'test'});
+$template->output(media => 'test');
+
+ok (open (LPR_TEST, '<', 't/var/04-lpr-test'), 'LedgerSMB::Template::_output_lpr output file opened successfully');
+
+my $line1 = <LPR_TEST>;
+
+like($line1, qr/^%PDF/, 'output file is pdf');
# Functions
sub get_output_line_array {