Test an edge-case with template inclusion in {{#markdown}}

This commit is contained in:
Avital Oliver
2014-01-20 14:24:28 -08:00
parent 0a6e9c984f
commit f440a117ef
2 changed files with 4 additions and 2 deletions

View File

@@ -391,7 +391,7 @@ some paragraph to fix showdown's four space parsing below.
</template>
<template name="spacebars_template_test_markdown_inclusion_subtmpl">
<span>Nothing in particular</span>
<span>{{#if foo}}Foo is {{foo}}.{{/if}}</span>
</template>
<template name="spacebars_template_test_markdown_block_helpers">

View File

@@ -1121,8 +1121,10 @@ Tinytest.add('spacebars - templates - #markdown - each', function (test) {
Tinytest.add('spacebars - templates - #markdown - inclusion', function (test) {
var tmpl = Template.spacebars_template_test_markdown_inclusion;
var subtmpl = Template.spacebars_template_test_markdown_inclusion_subtmpl;
subtmpl.foo = "bar";
var div = renderToDiv(tmpl);
test.equal(divContentForMarkdown(div), "<p><span>Nothing in particular</span></p>");
test.equal(divContentForMarkdown(div), "<p><span>Foo is bar.</span></p>");
});
Tinytest.add('spacebars - templates - #markdown - block helpers', function (test) {