summaryrefslogtreecommitdiffstats
path: root/spec
diff options
context:
space:
mode:
authorwout <wout@impinc.co.uk>2013-06-24 13:46:58 +0100
committerwout <wout@impinc.co.uk>2013-06-24 13:46:58 +0100
commitb1669697a9c05401673e87e84b6713af15be9e05 (patch)
tree7ae56f7cf68c4857c1f66b2fa8a49b3202edabeb /spec
parent65f915f1f3c878d97634ed360337d0ab2ea2d0d3 (diff)
downloadsvg.js-b1669697a9c05401673e87e84b6713af15be9e05.tar.gz
svg.js-b1669697a9c05401673e87e84b6713af15be9e05.zip
Added default stroke-linejoin and stroke-linecap values
Diffstat (limited to 'spec')
-rw-r--r--spec/spec/element.js9
1 files changed, 6 insertions, 3 deletions
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;')
})