aboutsummaryrefslogtreecommitdiffstats
path: root/test/directivesSpec.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/directivesSpec.js')
-rw-r--r--test/directivesSpec.js9
1 files changed, 8 insertions, 1 deletions
diff --git a/test/directivesSpec.js b/test/directivesSpec.js
index 0e99a63f..34dcbf8d 100644
--- a/test/directivesSpec.js
+++ b/test/directivesSpec.js
@@ -50,11 +50,18 @@ describe("directives", function(){
it('should set html', function() {
var scope = compile('<div ng:bind="html|html"></div>');
- scope.html = '<div>hello</div>';
+ scope.html = '<div unknown>hello</div>';
scope.$eval();
expect(lowercase(element.html())).toEqual('<div>hello</div>');
});
+ it('should set unsafe html', function() {
+ var scope = compile('<div ng:bind="html|html:\'unsafe\'"></div>');
+ scope.html = '<div onclick="">hello</div>';
+ scope.$eval();
+ expect(lowercase(element.html())).toEqual('<div onclick="">hello</div>');
+ });
+
it('should set element element', function() {
angularFilter.myElement = function() {
return jqLite('<a>hello</a>');