diff options
| author | Misko Hevery | 2010-04-07 14:13:28 -0700 |
|---|---|---|
| committer | Misko Hevery | 2010-04-07 14:13:28 -0700 |
| commit | 3c5e0205f947fb1aef0eb1261f7d980600ab5482 (patch) | |
| tree | 0684b2293f860927696a20c04f15b506faaf9343 /test/directivesSpec.js | |
| parent | 6ea1ac7b05a4079bcda0356e095703d36ccdf6b3 (diff) | |
| parent | 29309e0e5a5f5eafd0f948100417d63127d3332d (diff) | |
| download | angular.js-3c5e0205f947fb1aef0eb1261f7d980600ab5482.tar.bz2 | |
Merge branch 'directives' of github.com:angular/angular.js into directives
Diffstat (limited to 'test/directivesSpec.js')
| -rw-r--r-- | test/directivesSpec.js | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/test/directivesSpec.js b/test/directivesSpec.js index 7504bf6b..ea442d16 100644 --- a/test/directivesSpec.js +++ b/test/directivesSpec.js @@ -162,13 +162,16 @@ describe("directives", function(){ this.greeting = 'hello'; }; window.Greeter.prototype = { + init: function(){ + this.suffix = '!'; + }, greet: function(name) { - return this.greeting + ' ' + name; + return this.greeting + ' ' + name + this.suffix; } }; var scope = compile('<div ng-controller="Greeter"></div>'); expect(scope.greeting).toEqual('hello'); - expect(scope.greet('misko')).toEqual('hello misko'); + expect(scope.greet('misko')).toEqual('hello misko!'); delete window.Greeter; }); }); |
