diff options
Diffstat (limited to 'test')
| -rw-r--r-- | test/directivesSpec.js | 8 | ||||
| -rw-r--r-- | test/service/filter/filtersSpec.js | 4 | ||||
| -rw-r--r-- | test/service/parseSpec.js | 4 |
3 files changed, 8 insertions, 8 deletions
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('<div onclick="">hello</div>'); })); - 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('<a>hello</a>'); })); var element = $compile('<div ng:bind="0|myElement"></div>')($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; })); diff --git a/test/service/filter/filtersSpec.js b/test/service/filter/filtersSpec.js index 8d05d951..275dbab4 100644 --- a/test/service/filter/filtersSpec.js +++ b/test/service/filter/filtersSpec.js @@ -8,9 +8,9 @@ describe('filters', function() { filter = $filter; })); - it('should called the filter when evaluating expression', inject(function($rootScope, $provide) { + it('should called the filter when evaluating expression', inject(function($rootScope, $filterProvider) { var filter = jasmine.createSpy('myFilter'); - $provide.filter('myFilter', valueFn(filter)); + $filterProvider.register('myFilter', valueFn(filter)); $rootScope.$eval('10|myFilter'); expect(filter).toHaveBeenCalledWith(10); diff --git a/test/service/parseSpec.js b/test/service/parseSpec.js index 506d3373..2742f381 100644 --- a/test/service/parseSpec.js +++ b/test/service/parseSpec.js @@ -191,8 +191,8 @@ describe('parser', function() { expect(scope.$eval("'a' + 'b c'")).toEqual("ab c"); }); - it('should parse filters', inject(function($provide) { - $provide.filter('substring', valueFn(function(input, start, end) { + it('should parse filters', inject(function($filterProvider) { + $filterProvider.register('substring', valueFn(function(input, start, end) { return input.substring(start, end); })); |
