Permalink
Browse files

add test for render_string

  • Loading branch information...
1 parent 3c5ca2b commit 8669cdc0d4674c4cb9af38ab658c01442b963871 @ysasaki committed Sep 19, 2012
Showing with 20 additions and 0 deletions.
  1. +2 −0 MANIFEST
  2. +18 −0 t/001_template.t
View
@@ -1,6 +1,8 @@
+.shipit
Changes
lib/Text/Xslate/Bridge/FillInForm/Lite.pm
Makefile.PL
MANIFEST This list of files
README
t/000_compile.t
+t/001_template.t
View
@@ -0,0 +1,18 @@
+use strict;
+use warnings;
+use Test::More tests => 1;
+use Text::Xslate;
+
+my $tx = Text::Xslate->new(
+ module => [ 'Text::Xslate::Bridge::FillInForm::Lite' ]
+);
+
+my $output = $tx->render_string(<<'T', { q => { foo => 'bar' } } );
+: block form | fillinform($q) -> {
+<form><input name="foo" type="text" /></form>
+: }
+T
+
+is $output, <<'T', 'fillinform ok';
+<form><input name="foo" type="text" value="bar" /></form>
+T

0 comments on commit 8669cdc

Please sign in to comment.