test(jqLite): add test for mass assignment to style

This commit is contained in:
Igor Minar 2011-09-01 03:11:00 -07:00
parent 986608fe76
commit db78aa1ce1

View file

@ -266,6 +266,19 @@ describe('jqLite', function(){
expect(jqLite(a).css('prop')).toBeFalsy();
expect(jqLite(b).css('prop')).toBeFalsy();
});
it('should set a bunch of css properties specified via an object', function() {
expect(jqLite(a).css('foo')).toBeFalsy();
expect(jqLite(a).css('bar')).toBeFalsy();
expect(jqLite(a).css('baz')).toBeFalsy();
jqLite(a).css({'foo': 'a', 'bar': 'b', 'baz': ''});
expect(jqLite(a).css('foo')).toBe('a');
expect(jqLite(a).css('bar')).toBe('b');
expect(jqLite(a).css('baz')).toBeFalsy();
});
});