diff options
Diffstat (limited to 'test/directivesSpec.js')
| -rw-r--r-- | test/directivesSpec.js | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/test/directivesSpec.js b/test/directivesSpec.js index b6ccf764..fb1e868a 100644 --- a/test/directivesSpec.js +++ b/test/directivesSpec.js @@ -73,11 +73,14 @@ describe("directives", function(){ }); it('should have $element set to current bind element', function(){ - angularFilter.myFilter = function(){ - this.$element.text('HELLO'); + var innerText; + angularFilter.myFilter = function(text){ + innerText = this.$element.text(); + return text; }; - var scope = compile('<div>before<div ng:bind-template="{{0|myFilter}}"></div>after</div>'); + var scope = compile('<div>before<div ng:bind-template="{{\'HELLO\'|myFilter}}">INNER</div>after</div>'); expect(scope.$element.text()).toEqual("beforeHELLOafter"); + expect(innerText).toEqual('INNER'); }); }); |
