diff options
| author | Igor Minar | 2011-11-08 17:19:54 -0800 | 
|---|---|---|
| committer | Igor Minar | 2011-11-08 21:44:46 -0800 | 
| commit | 1e00db8daa5c09e7f8f9134f5c94b9a18c7dc425 (patch) | |
| tree | e42ab66c5a347b4ac6a40ff5b594205c600ea254 /test/AngularSpec.js | |
| parent | aaa01797585b0876f67cd1c24d94106871618074 (diff) | |
| download | angular.js-1e00db8daa5c09e7f8f9134f5c94b9a18c7dc425.tar.bz2 | |
fix(directives): make directive names case-insensitive
+ tests
+ added docs for angular.directive
Diffstat (limited to 'test/AngularSpec.js')
| -rw-r--r-- | test/AngularSpec.js | 23 | 
1 files changed, 23 insertions, 0 deletions
| diff --git a/test/AngularSpec.js b/test/AngularSpec.js index 7831539d..299bfb8a 100644 --- a/test/AngularSpec.js +++ b/test/AngularSpec.js @@ -427,6 +427,29 @@ describe('angular', function() {      });    }); + +  describe('directive', function() { +    it('should register directives with case-insensitive id', function() { +      angularDirective('ALLCAPS', function(val, el) {el.text('+' + val + '+')}); +      angularDirective('lowercase', function(val, el) {el.text('-' + val + '-')}); + +      var el = jqLite('<div>' + +                        '<span allcaps="xx1"></span>' + +                        '<span ALLcaps="xx2"></span>' + +                        '<span ALLCAPS="xx3"></span>' + +                        '<span lowerCASE="XX4">xx4</span>' + +                      '</div>'); +      compile(el); +      expect(lowercase(sortedHtml(el))).toBe('<div>' + +                                                '<span allcaps="xx1">+xx1+</span>' + +                                                '<span allcaps="xx2">+xx2+</span>' + +                                                '<span allcaps="xx3">+xx3+</span>' + +                                                '<span lowercase="xx4">-xx4-</span>' + +                                              '</div>'); +    }); +  }); + +    describe('isDate', function() {      it('should return true for Date object', function() {        expect(isDate(new Date())).toBe(true); | 
