aboutsummaryrefslogtreecommitdiffstats
path: root/test/ScopeSpec.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/ScopeSpec.js')
-rw-r--r--test/ScopeSpec.js13
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');
});