From 2496f08b17a8ad4cda46221e0a2d99503b4f2704 Mon Sep 17 00:00:00 2001 From: Jonathan Puckey Date: Fri, 22 Apr 2011 11:42:07 +0200 Subject: [PATCH] Segment tests: add a test for segment selection. --- test/tests/Segment.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/test/tests/Segment.js b/test/tests/Segment.js index 2c87ef98..b4124911 100644 --- a/test/tests/Segment.js +++ b/test/tests/Segment.js @@ -48,4 +48,14 @@ test('segment.remove()', function() { var path = new Path([10, 10], [5, 5], [10, 10]); path.segments[1].remove(); equals(path.segments.length, 2); +}); + +test('segment.selected', function() { + var doc = new Document(); + var path = new Path([10, 20], [50, 100]); + path.segments[0].point.selected = true; + equals(path.segments[0].point.selected, true); + + path.segments[0].point.selected = false; + equals(path.segments[0].point.selected, false); }); \ No newline at end of file