From b1669697a9c05401673e87e84b6713af15be9e05 Mon Sep 17 00:00:00 2001 From: wout Date: Mon, 24 Jun 2013 13:46:58 +0100 Subject: Added default stroke-linejoin and stroke-linecap values --- spec/spec/element.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'spec') diff --git a/spec/spec/element.js b/spec/spec/element.js index 9e8a204..bea8481 100644 --- a/spec/spec/element.js +++ b/spec/spec/element.js @@ -47,16 +47,19 @@ describe('Element', function() { expect(rect.node.getAttribute('stroke-width')).toBe('11') expect(rect.attr('stroke-width')).toBe(11) }) - it('should correctly parse negative numeric values as a getter', function() { + it('correctly parses negative numeric values as a getter', function() { rect.attr('x', -120) expect(rect.node.getAttribute('x')).toBe('-120') expect(rect.attr('x')).toBe(-120) }) - it('should get the "style" attribute as a string', function() { + it('falls back on default values if attribute is not present', function() { + expect(rect.attr('stroke-linejoin')).toBe('miter') + }) + it('gets the "style" attribute as a string', function() { rect.style('cursor', 'pointer') expect(rect.attr('style')).toBe('cursor:pointer;') }) - it('should redirect to the style() method when setting a style string', function() { + it('redirects to the style() method when setting a style string', function() { rect.attr('style', 'cursor:move;') expect(rect.node.getAttribute('style')).toBe('cursor:move;') }) -- cgit v1.2.3