aboutsummaryrefslogtreecommitdiffstats
path: root/test/directivesSpec.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/directivesSpec.js')
-rw-r--r--test/directivesSpec.js7
1 files changed, 5 insertions, 2 deletions
diff --git a/test/directivesSpec.js b/test/directivesSpec.js
index 0a7e3c18..74aa942b 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;
});
});