+test("attr(jquery_method)", function(){
+ expect(10);
+
+ var $elem = jQuery("<div />"),
+ elem = $elem[0];
+
+ // one at a time
+ $elem.attr('html', 'foo');
+ equals( elem.innerHTML, 'foo', 'attr(html)');
+
+ $elem.attr('text', 'bar');
+ equals( elem.innerHTML, 'bar', 'attr(text)');
+
+ $elem.attr('addClass', 'css');
+ equals( elem.className, 'css', 'attr(addClass)');
+
+ $elem.attr('removeClass', 'css');
+ equals( jQuery.trim(elem.className), '', 'attr(removeClass)');
+
+ $elem.attr('css', {color:'red'});
+ ok( /^(#ff0000|red)$/i.test(elem.style.color), 'attr(css)');
+
+ $elem.attr('height', 10);
+ equals( elem.style.height, '10px', 'attr(height)');
+
+ $elem.attr('each', function(){
+ return function(){
+ ok(true, 'attr(each)');
+ };
+ });
+
+ // Multiple attributes
+
+ $elem.attr({
+ width:10,
+ css:{ paddingLeft:1, paddingRight:1 }
+ });
+
+ equals( elem.style.width, '10px', 'attr({...})');
+ equals( elem.style.paddingLeft, '1px', 'attr({...})');
+ equals( elem.style.paddingRight, '1px', 'attr({...})');
+});
+