Test that template in DOM before rendered callback fires

This commit is contained in:
Avital Oliver
2014-01-14 16:39:54 -08:00
parent 56e94821e3
commit 06c0a9d8aa

View File

@@ -780,6 +780,18 @@ testAsyncMulti('spacebars - template - defer in rendered callbacks', [function (
coll.insert({});
}]);
testAsyncMulti('spacebars - template - rendered template is DOM in rendered callbacks', [
function (test, expect) {
var tmpl = Template.spacebars_template_test_aaa;
tmpl.rendered = expect(function () {
console.log('in rendered');
test.equal(trim(stripComments(div.innerHTML)), "aaa");
});
var div = renderToDiv(tmpl);
Deps.flush();
}
]);
// Test that in:
//
// ```