Removed .attr(removeClass) and .attr(each) tests as they don't really make sense.
This commit is contained in:
parent
ecdcda870c
commit
0ab118ae0d
|
@ -184,7 +184,7 @@ test("attr(String, Object)", function() {
|
||||||
});
|
});
|
||||||
|
|
||||||
test("attr(jquery_method)", function(){
|
test("attr(jquery_method)", function(){
|
||||||
expect(10);
|
expect(8);
|
||||||
|
|
||||||
var $elem = jQuery("<div />"),
|
var $elem = jQuery("<div />"),
|
||||||
elem = $elem[0];
|
elem = $elem[0];
|
||||||
|
@ -199,21 +199,12 @@ test("attr(jquery_method)", function(){
|
||||||
$elem.attr('addClass', 'css');
|
$elem.attr('addClass', 'css');
|
||||||
equals( elem.className, 'css', 'attr(addClass)');
|
equals( elem.className, 'css', 'attr(addClass)');
|
||||||
|
|
||||||
$elem.attr('removeClass', 'css');
|
|
||||||
equals( jQuery.trim(elem.className), '', 'attr(removeClass)');
|
|
||||||
|
|
||||||
$elem.attr('css', {color:'red'});
|
$elem.attr('css', {color:'red'});
|
||||||
ok( /^(#ff0000|red)$/i.test(elem.style.color), 'attr(css)');
|
ok( /^(#ff0000|red)$/i.test(elem.style.color), 'attr(css)');
|
||||||
|
|
||||||
$elem.attr('height', 10);
|
$elem.attr('height', 10);
|
||||||
equals( elem.style.height, '10px', 'attr(height)');
|
equals( elem.style.height, '10px', 'attr(height)');
|
||||||
|
|
||||||
$elem.attr('each', function(){
|
|
||||||
return function(){
|
|
||||||
ok(true, 'attr(each)');
|
|
||||||
};
|
|
||||||
});
|
|
||||||
|
|
||||||
// Multiple attributes
|
// Multiple attributes
|
||||||
|
|
||||||
$elem.attr({
|
$elem.attr({
|
||||||
|
|
Loading…
Reference in a new issue