From d0c34f778e854bd5f3e1c15d853bd126aad2d85d Mon Sep 17 00:00:00 2001 From: wout Date: Mon, 15 Apr 2013 12:04:41 +0100 Subject: Removing style attributes when empty --- spec/spec/element.js | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'spec') diff --git a/spec/spec/element.js b/spec/spec/element.js index 03f8db7..757025a 100644 --- a/spec/spec/element.js +++ b/spec/spec/element.js @@ -60,6 +60,10 @@ describe('Element', function() { rect.attr('style', 'cursor:move;') expect(rect.node.getAttribute('style')).toBe('cursor:move;') }) + it('should remove style attribute on node if the style is empty', function() { + rect.style('style', '') + expect(rect.node.getAttribute('style')).toBe(null) + }) }) describe('style()', function() { -- cgit v1.2.3