diff options
| author | Misko Hevery | 2010-12-09 22:09:46 -0800 |
|---|---|---|
| committer | Misko Hevery | 2010-12-11 08:28:11 -0800 |
| commit | ec4d446f898e7860c12a337200c31c3b75f663cc (patch) | |
| tree | b8cca66bbeae20285b38314dd518ca04e64762d6 /test/widgetsSpec.js | |
| parent | b225083a21844bdc710b02337dfa1bef5883baf3 (diff) | |
| download | angular.js-ec4d446f898e7860c12a337200c31c3b75f663cc.tar.bz2 | |
Closes #153: input widgets without name are ignored
Diffstat (limited to 'test/widgetsSpec.js')
| -rw-r--r-- | test/widgetsSpec.js | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/test/widgetsSpec.js b/test/widgetsSpec.js index d6cee491..cfda67d1 100644 --- a/test/widgetsSpec.js +++ b/test/widgetsSpec.js @@ -452,10 +452,17 @@ describe("widget", function(){ scope.$eval(); expect(element[0].childNodes[0].selected).toEqual(true); }); - - it('should report error on missing field', function(){ + + it('should ignore text widget which have no name', function(){ compile('<input type="text"/>'); - expect(element.hasClass('ng-exception')).toBeTruthy(); + expect(scope.$element.attr('ng-exception')).toBeFalsy(); + expect(scope.$element.hasClass('ng-exception')).toBeFalsy(); + }); + + it('should ignore checkbox widget which have no name', function(){ + compile('<input type="checkbox"/>'); + expect(scope.$element.attr('ng-exception')).toBeFalsy(); + expect(scope.$element.hasClass('ng-exception')).toBeFalsy(); }); it('should report error on assignment error', function(){ |
