From a8aa5af413c068608aa28ef0d48cef1d5ad66485 Mon Sep 17 00:00:00 2001 From: Misko Hevery Date: Wed, 7 Apr 2010 16:36:33 -0700 Subject: fixed filter this --- test/FiltersTest.js | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'test') diff --git a/test/FiltersTest.js b/test/FiltersTest.js index 15a2ebc3..fd5c9976 100644 --- a/test/FiltersTest.js +++ b/test/FiltersTest.js @@ -13,17 +13,14 @@ FiltersTest.prototype.XtestCurrency = function(){ assertEquals(html.hasClass('ng-format-negative'), false); }; -FiltersTest.prototype.XtestFilterThisIsContext = function(){ - expectAsserts(2); - var scope = new Scope(); - Scope.expressionCache = {}; - scope.set('name', 'misko'); - var context = {$element:123}; +FiltersTest.prototype.testFilterThisIsContext = function(){ + expectAsserts(1); + var scope = createScope(); + scope.name = 'misko'; angular.filter.testFn = function () { - assertEquals('Context not equal', 123, this.$element); assertEquals('scope not equal', 'misko', this.name); }; - scope.eval("0|testFn", context); + scope.$eval("0|testFn"); delete angular.filter['testFn']; }; -- cgit v1.2.3