Add explicit SafeString property test

This commit is contained in:
kpdecker
2013-02-16 13:55:25 -06:00
parent 75a4f0d931
commit 30623ce903
+6
View File
@@ -629,6 +629,12 @@ test("constructing a safestring from a string and checking its type", function()
equal(safe, "testing 1, 2, 3", "SafeString is equivalent to its underlying string");
});
test("it should not escape SafeString properties", function() {
var name = new Handlebars.SafeString("<em>Sean O&#x27;Malley</em>");
shouldCompileTo('{{name}}', [{ name: name }], "<em>Sean O&#x27;Malley</em>");
});
suite("helperMissing");
test("if a context is not found, helperMissing is used", function() {