summaryrefslogtreecommitdiffstats
path: root/spec
diff options
context:
space:
mode:
authorwout <wout@impinc.co.uk>2013-04-15 12:04:41 +0100
committerwout <wout@impinc.co.uk>2013-04-15 12:04:41 +0100
commitd0c34f778e854bd5f3e1c15d853bd126aad2d85d (patch)
tree409f40cf2fe69aef513676e59a2d88d8f069d25b /spec
parent801a9e1bfb6ff2fb31d00f9bc71b9af1175395bb (diff)
downloadsvg.js-d0c34f778e854bd5f3e1c15d853bd126aad2d85d.tar.gz
svg.js-d0c34f778e854bd5f3e1c15d853bd126aad2d85d.zip
Removing style attributes when empty
Diffstat (limited to 'spec')
-rw-r--r--spec/spec/element.js4
1 files changed, 4 insertions, 0 deletions
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() {