aboutsummaryrefslogtreecommitdiffstats
path: root/test/directivesSpec.js
diff options
context:
space:
mode:
authorMisko Hevery2011-11-09 22:02:39 -0800
committerMisko Hevery2011-11-14 20:31:16 -0800
commit74fac45f48acd5b2fc57befd7dd7739805e330c3 (patch)
tree19993d81233eb73fccfaa4d448bc720fa4972a5c /test/directivesSpec.js
parentf0fa5e63762e80fd4ee60ff6d365fca5f886292a (diff)
downloadangular.js-74fac45f48acd5b2fc57befd7dd7739805e330c3.tar.bz2
doc($filter): added $filter documentation
Diffstat (limited to 'test/directivesSpec.js')
-rw-r--r--test/directivesSpec.js8
1 files changed, 4 insertions, 4 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;
}));