diff options
| author | Igor Minar | 2010-11-09 15:10:45 -0800 |
|---|---|---|
| committer | Misko Hevery | 2010-11-09 19:58:42 -0800 |
| commit | 264f960800426ce61ad26dcdb60b099fd3e8e1c4 (patch) | |
| tree | bb9280c992b169c4fe1ff976bcdd0bfe97738a88 | |
| parent | 257e97a65f7dd794faa5d8c0d72bbd5a894cb471 (diff) | |
| download | angular.js-264f960800426ce61ad26dcdb60b099fd3e8e1c4.tar.bz2 | |
added spec for auto bootstrap with #autobind
| -rw-r--r-- | test/AngularSpec.js | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/test/AngularSpec.js b/test/AngularSpec.js index 23f06887..6733a7ab 100644 --- a/test/AngularSpec.js +++ b/test/AngularSpec.js @@ -255,6 +255,20 @@ describe('angularJsConfig', function() { }); + it('should extract angular autobind config from the script hashpath attributes', function() { + var doc = { getElementsByTagName: function(tagName) { + expect(lowercase(tagName)).toEqual('script'); + return [{nodeName: 'SCRIPT', + src: 'angularjs/angular.js#autobind'}]; + }}; + + expect(angularJsConfig(doc)).toEqual({base_url: 'angularjs/', + autobind: true, + ie_compat: 'angularjs/angular-ie-compat.js', + ie_compat_id: 'ng-ie-compat'}); + }); + + it("should default to versioned ie-compat file if angular file is versioned", function() { var doc = { getElementsByTagName: function(tagName) { expect(lowercase(tagName)).toEqual('script'); |
