From b261fafd32b2c13ab045e953ced4ac5306f4e729 Mon Sep 17 00:00:00 2001 From: Jonathan Puckey Date: Sat, 12 Feb 2011 18:07:14 +0100 Subject: [PATCH] Add test for Document#activate() --- test/index.html | 1 + test/tests/Document.js | 10 ++++++++++ 2 files changed, 11 insertions(+) create mode 100644 test/tests/Document.js diff --git a/test/index.html b/test/index.html index a20688bb..9fbb0834 100644 --- a/test/index.html +++ b/test/index.html @@ -26,6 +26,7 @@ + diff --git a/test/tests/Document.js b/test/tests/Document.js new file mode 100644 index 00000000..37265e8e --- /dev/null +++ b/test/tests/Document.js @@ -0,0 +1,10 @@ +module('Document'); + +test('activate()', function() { + var doc = new Doc(); + var secondDoc = new Doc(); + doc.activate(); + var path = new Path(); + equals(doc.activeLayer.children[0] == path, true); + equals(secondDoc.activeLayer.children.length == 0, true); +}); \ No newline at end of file