aboutsummaryrefslogtreecommitdiffstats
path: root/test/widgetsSpec.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/widgetsSpec.js')
-rw-r--r--test/widgetsSpec.js13
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(){