aboutsummaryrefslogtreecommitdiffstats
path: root/test/directivesSpec.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/directivesSpec.js')
-rw-r--r--test/directivesSpec.js11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/directivesSpec.js b/test/directivesSpec.js
index c925bdb5..1cbb92b0 100644
--- a/test/directivesSpec.js
+++ b/test/directivesSpec.js
@@ -80,6 +80,11 @@ describe("directive", function() {
expect(scope.$element.text()).toEqual('-0false');
});
+ it('should render object as JSON ignore $$', function(){
+ var scope = compile('<div>{{ {key:"value", $$key:"hide"} }}</div>');
+ scope.$digest();
+ expect(fromJson(scope.$element.text())).toEqual({key:'value'});
+ });
});
describe('ng:bind-template', function() {
@@ -103,6 +108,12 @@ describe("directive", function() {
expect(innerText).toEqual('INNER');
});
+ it('should render object as JSON ignore $$', function(){
+ var scope = compile('<pre>{{ {key:"value", $$key:"hide"} }}</pre>');
+ scope.$digest();
+ expect(fromJson(scope.$element.text())).toEqual({key:'value'});
+ });
+
});
describe('ng:bind-attr', function() {