From 74fac45f48acd5b2fc57befd7dd7739805e330c3 Mon Sep 17 00:00:00 2001 From: Misko Hevery Date: Wed, 9 Nov 2011 22:02:39 -0800 Subject: doc($filter): added $filter documentation --- test/directivesSpec.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'test/directivesSpec.js') diff --git a/test/directivesSpec.js b/test/directivesSpec.js index 51cc5489..3ca60ae4 100644 --- a/test/directivesSpec.js +++ b/test/directivesSpec.js @@ -41,8 +41,8 @@ describe("directive", function() { expect(lowercase(element.html())).toEqual('
hello
'); })); - it('should set element element', inject(function($rootScope, $compile, $provide) { - $provide.filter('myElement', valueFn(function() { + it('should set element element', inject(function($rootScope, $compile, $filterProvider) { + $filterProvider.register('myElement', valueFn(function() { return jqLite('hello'); })); var element = $compile('
')($rootScope); @@ -73,9 +73,9 @@ describe("directive", function() { expect(element.text()).toEqual('Hello Misko!'); })); - it('should have $element set to current bind element', inject(function($rootScope, $compile, $provide) { + it('should have $element set to current bind element', inject(function($rootScope, $compile, $filterProvider) { var innerText; - $provide.filter('myFilter', valueFn(function(text) { + $filterProvider.register('myFilter', valueFn(function(text) { innerText = innerText || this.$element.text(); return text; })); -- cgit v1.2.3