summaryrefslogtreecommitdiffstats
path: root/t/partials.t
blob: 8238d770563fcba04d24db12306c055661f9acc7 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
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;