Add bind initialization call.
Project: http://git-wip-us.apache.org/repos/asf/incubator-cordova-app-hello-world/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-cordova-app-hello-world/commit/5fe4752e Tree: http://git-wip-us.apache.org/repos/asf/incubator-cordova-app-hello-world/tree/5fe4752e Diff: http://git-wip-us.apache.org/repos/asf/incubator-cordova-app-hello-world/diff/5fe4752e Branch: refs/heads/master Commit: 5fe4752e3ca098d14bfba3ef1362477e24bd126c Parents: fc2c23c Author: Michael Brooks <mich...@michaelbrooks.ca> Authored: Thu Jul 12 21:34:20 2012 -0700 Committer: Michael Brooks <mich...@michaelbrooks.ca> Committed: Thu Jul 12 21:34:20 2012 -0700 ---------------------------------------------------------------------- www/js/index.js | 3 +++ www/spec/index.js | 6 ++++++ 2 files changed, 9 insertions(+), 0 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-cordova-app-hello-world/blob/5fe4752e/www/js/index.js ---------------------------------------------------------------------- diff --git a/www/js/index.js b/www/js/index.js index 7e4402e..67f3ed4 100644 --- a/www/js/index.js +++ b/www/js/index.js @@ -1,4 +1,7 @@ var app = { initialize: function() { + this.bind(); + }, + bind: function() { } }; http://git-wip-us.apache.org/repos/asf/incubator-cordova-app-hello-world/blob/5fe4752e/www/spec/index.js ---------------------------------------------------------------------- diff --git a/www/spec/index.js b/www/spec/index.js index f6856c8..7d48350 100644 --- a/www/spec/index.js +++ b/www/spec/index.js @@ -7,5 +7,11 @@ describe('app', function() { it('should exist', function() { expect(app.initialize).toBeDefined(); }); + + it('should bind events', function() { + spyOn(app, 'bind'); + app.initialize(); + expect(app.bind).toHaveBeenCalled(); + }); }); });