diff options
Diffstat (limited to 'spec')
-rw-r--r-- | spec/spec/element.js | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/spec/spec/element.js b/spec/spec/element.js index 98d5211..e20d69e 100644 --- a/spec/spec/element.js +++ b/spec/spec/element.js @@ -669,11 +669,18 @@ describe('Element', function() { clone = rect.clone() expect(rect.next()).toBe(clone) }) - it('inserts the clone in the specided parent', function() { + it('inserts the clone in the specified parent', function() { var g = draw.group() clone = rect.clone(g) expect(g.get(0)).toBe(clone) }) + it('deep copies over dom data', function() { + group.dom = {'foo':'bar'} + rect.dom = {'foo':'baz'} + clone = group.clone() + expect(clone.dom.foo).toBe('bar') + expect(clone.get(0).dom.foo).toBe('baz') + }) }) describe('toString()', function() { |