diff --git a/test/tests/PlacedSymbol.js b/test/tests/PlacedSymbol.js index fd840c03..d066c24e 100644 --- a/test/tests/PlacedSymbol.js +++ b/test/tests/PlacedSymbol.js @@ -37,4 +37,30 @@ test('Symbol definition selection', function() { equals(function() { return paper.project.selectedItems.length == 0; }, true); -}); \ No newline at end of file +}); + +test('Symbol#place()', function() { + var path = new Path.Circle([50, 50], 50); + var symbol = new Symbol(path); + var placedSymbol = symbol.place(); + equals(function() { + return placedSymbol.parent == paper.project.activeLayer; + }, true); + + equals(function() { + return placedSymbol.symbol == symbol; + }, true); + + equals(function() { + return placedSymbol.position.toString(); + }, '{ x: 0, y: 0 }'); +}); + +test('Symbol#place(position)', function() { + var path = new Path.Circle([50, 50], 50); + var symbol = new Symbol(path); + var placedSymbol = symbol.place(new Point(100, 100)); + equals(function() { + return placedSymbol.position.toString(); + }, '{ x: 100, y: 100 }'); +});