From e69395ced045291cdc74097d53548665d11672e6 Mon Sep 17 00:00:00 2001 From: Jonathan Puckey Date: Tue, 14 Jun 2011 12:19:54 +0200 Subject: [PATCH] Add failing test. --- test/tests/Path.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/test/tests/Path.js b/test/tests/Path.js index 9e6af806..91cd636b 100644 --- a/test/tests/Path.js +++ b/test/tests/Path.js @@ -114,6 +114,21 @@ test('Is the path deselected after setting a new list of segments?', function() }, 0); }); +test('After setting Path#selected=true on an empty path, subsequent segments should be selected', function() { + var path = new Path(); + path.selected = true; + equals(function() { + return path.selected; + }, true); + path.add([10, 10]); + equals(function() { + return path.selected; + }, true); + equals(function() { + return path.firstSegment.selected; + }, true); +}); + test('Path#reverse', function() { var path = new Path.Circle([100, 100], 30); path.reverse();