summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2012-10-05 12:47:06 -0500
committerJesse Luehrs <doy@tozt.net>2012-10-05 12:47:06 -0500
commitc2b9ded442bbcd216c166b2761c32c675ce6f395 (patch)
tree50eb5b00a2de2431bd0301f3a6d02dd85904005d
parente8a83edb85216a9f6978a99c77cc196db5cb4c44 (diff)
downloadtext-handlebars-c2b9ded442bbcd216c166b2761c32c675ce6f395.tar.gz
text-handlebars-c2b9ded442bbcd216c166b2761c32c675ce6f395.zip
test for passing context to partials
-rw-r--r--t/partials.t25
1 files changed, 25 insertions, 0 deletions
diff --git a/t/partials.t b/t/partials.t
new file mode 100644
index 0000000..8238d77
--- /dev/null
+++ b/t/partials.t
@@ -0,0 +1,25 @@
+#!/usr/bin/env perl
+use strict;
+use warnings;
+use lib 't/lib';
+use Test::More;
+use Test::Handlebars;
+
+{ local $TODO = "unimplemented";
+render_ok(
+ {
+ path => [ { dude => '{{#this}}{{name}} ({{url}}) {{/this}}' } ],
+ },
+ 'Dudes: {{>dude dudes}}',
+ {
+ dudes => [
+ { name => "Yehuda", url => "http://yehuda" },
+ { name => "Alan", url => "http://alan" },
+ ],
+ },
+ 'Dudes: Yehuda (http://yehuda) Alan (http://alan) ',
+ "passing a context to partials"
+);
+}
+
+done_testing;