From 5fdb117b32b72a908a3938bee8f1bce9854a0004 Mon Sep 17 00:00:00 2001 From: Misko Hevery Date: Thu, 22 Apr 2010 22:09:17 -0700 Subject: clean up failing test with jquery --- test/directivesSpec.js | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'test/directivesSpec.js') 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('
'); - expect(scope.$element.attr('disabled')).toEqual(null); - expect(scope.$element.attr('readonly')).toEqual(null); - expect(scope.$element.attr('checked')).toEqual(null); + var scope = compile(''); + 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(){ -- cgit v1.2.3