diff options
| author | Andres Ornelas | 2010-07-27 10:44:46 -0700 |
|---|---|---|
| committer | Andres Ornelas | 2010-07-27 10:44:46 -0700 |
| commit | b42072733c3afd03a49457d88ffed28ebe55655e (patch) | |
| tree | 2fa2b8703cdc75fe19a204d2c9677e27d33c8176 /test/ScopeSpec.js | |
| parent | 2f7c538628929888ce7c99b9577e34f8c87211f7 (diff) | |
| parent | 8ddee9bb25ade2bbe7d57db6353b29867606c184 (diff) | |
| download | angular.js-b42072733c3afd03a49457d88ffed28ebe55655e.tar.bz2 | |
Merge branch 'master' of github.com:angular/angular.js into future
Diffstat (limited to 'test/ScopeSpec.js')
| -rw-r--r-- | test/ScopeSpec.js | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/test/ScopeSpec.js b/test/ScopeSpec.js index d93400e5..6f5485e7 100644 --- a/test/ScopeSpec.js +++ b/test/ScopeSpec.js @@ -15,12 +15,17 @@ describe('scope/model', function(){ expect(model.$root).toEqual(model); }); + it('should return noop function when LHS is undefined', function(){ + var model = createScope(); + expect(model.$eval('x.$filter()')).toEqual(undefined); + }); + describe('$eval', function(){ - it('should eval function with correct this and pass arguments', function(){ + it('should eval function with correct this', function(){ var model = createScope(); - model.$eval(function(name){ - this.name = name; - }, 'works'); + model.$eval(function(){ + this.name = 'works'; + }); expect(model.name).toEqual('works'); }); |
