Skip to content

Commit

Permalink
Add a blaze test for #3130
Browse files Browse the repository at this point in the history
  • Loading branch information
Slava committed Dec 9, 2014
1 parent 918a9e0 commit ebce6c4
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
6 changes: 6 additions & 0 deletions packages/spacebars-tests/template_tests.html
Expand Up @@ -1000,3 +1000,9 @@
<template name="spacebars_template_test_oldstyle_helpers">
{{foo}}
</template>

<!-- issue meteor/meteor #3130 -->
<template name="spacebars_template_test_with_data_remove">
<b>some data - {{foo}}</b>
</template>

10 changes: 10 additions & 0 deletions packages/spacebars-tests/template_tests.js
Expand Up @@ -3037,3 +3037,13 @@ Tinytest.add("spacebars-tests - template_tests - old-style helpers", function (t
var div = renderToDiv(tmpl);
test.equal(canonicalizeHtml(div.innerHTML), '');
});

Tinytest.add("spacebars-tests - template_tests - with data remove (#3130)", function (test) {
var tmpl = Template.spacebars_template_test_with_data_remove;

var div = renderToDiv(tmpl, { foo: 3130 });
test.equal(canonicalizeHtml(div.innerHTML), '<b>some data - 3130</b>');
var view = Blaze.getView(div.querySelector('b'));
Blaze.remove(view);
test.equal(div.innerHTML, "");
});

0 comments on commit ebce6c4

Please sign in to comment.