aboutsummaryrefslogtreecommitdiffstats
path: root/test/directivesSpec.js
diff options
context:
space:
mode:
authorMisko Hevery2010-04-22 22:09:17 -0700
committerMisko Hevery2010-04-22 22:09:17 -0700
commit5fdb117b32b72a908a3938bee8f1bce9854a0004 (patch)
tree847d324485a32188e62ac16987b0bffedd8b648e /test/directivesSpec.js
parent8b63c2c4e6924b062a318eebc6e862a4cef0b836 (diff)
downloadangular.js-5fdb117b32b72a908a3938bee8f1bce9854a0004.tar.bz2
clean up failing test with jquery
Diffstat (limited to 'test/directivesSpec.js')
-rw-r--r--test/directivesSpec.js15
1 files changed, 8 insertions, 7 deletions
diff --git a/test/directivesSpec.js b/test/directivesSpec.js
index 71402af7..eb8a9785 100644
--- a/test/directivesSpec.js
+++ b/test/directivesSpec.js
@@ -58,19 +58,20 @@ describe("directives", function(){
});
it('should remove special attributes on false', function(){
- var scope = compile('<div ng-bind-attr="{disabled:\'{{disabled}}\', readonly:\'{{readonly}}\', checked:\'{{checked}}\'}"/>');
- expect(scope.$element.attr('disabled')).toEqual(null);
- expect(scope.$element.attr('readonly')).toEqual(null);
- expect(scope.$element.attr('checked')).toEqual(null);
+ var scope = compile('<input ng-bind-attr="{disabled:\'{{disabled}}\', readonly:\'{{readonly}}\', checked:\'{{checked}}\'}"/>');
+ var input = scope.$element[0];
+ expect(input.disabled).toEqual(false);
+ expect(input.readOnly).toEqual(false);
+ expect(input.checked).toEqual(false);
scope.disabled = true;
scope.readonly = true;
scope.checked = true;
scope.$eval();
- expect(scope.$element.attr('disabled')).not.toEqual(null);
- expect(scope.$element.attr('readonly')).not.toEqual(null);
- expect(scope.$element.attr('checked')).not.toEqual(null);
+ expect(input.disabled).toEqual(true);
+ expect(input.readOnly).toEqual(true);
+ expect(input.checked).toEqual(true);
});
it('should ng-non-bindable', function(){