From 0d7fe97aff0d69fa9c72c6eb08d0dffc70359dae Mon Sep 17 00:00:00 2001 From: Igor Minar Date: Thu, 15 Sep 2011 00:35:09 +0200 Subject: fix(jqLite): attr() should not special-case 'class' attribute since jQuery 1.6 'class' is not treated specially, so we have to revert this fix and use className in tests instead --- test/directivesSpec.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'test/directivesSpec.js') diff --git a/test/directivesSpec.js b/test/directivesSpec.js index 2979cf75..6dbbfe9d 100644 --- a/test/directivesSpec.js +++ b/test/directivesSpec.js @@ -254,7 +254,7 @@ describe("directive", function() { scope.$digest(); scope.dynCls = 'foo'; scope.$digest(); - expect(element.attr('class')).toBe('ui-panel ui-selected ng-directive foo'); + expect(element[0].className).toBe('ui-panel ui-selected ng-directive foo'); }); @@ -262,7 +262,7 @@ describe("directive", function() { var scope = compile('
'); scope.dynCls = 'panel'; scope.$digest(); - expect(element.attr('class')).toBe('panel bar ng-directive'); + expect(element[0].className).toBe('panel bar ng-directive'); }); @@ -272,7 +272,7 @@ describe("directive", function() { scope.$digest(); scope.dynCls = 'window'; scope.$digest(); - expect(element.attr('class')).toBe('bar ng-directive window'); + expect(element[0].className).toBe('bar ng-directive window'); }); @@ -283,7 +283,7 @@ describe("directive", function() { element.addClass('foo'); scope.dynCls = ''; scope.$digest(); - expect(element.attr('class')).toBe('ng-directive'); + expect(element[0].className).toBe('ng-directive'); }); @@ -291,7 +291,7 @@ describe("directive", function() { var scope = compile(''); scope.dynCls = [undefined, null]; scope.$digest(); - expect(element.attr('class')).toBe('ng-directive'); + expect(element[0].className).toBe('ng-directive'); }); }); -- cgit v1.2.3