Use #appendTop() instead of the remove #appendChild() in tests.

This commit is contained in:
Jürg Lehni 2011-05-17 13:09:35 +01:00
parent 515dbbb151
commit 4be0e55dc5

View file

@ -42,10 +42,10 @@ test('clone()', function() {
}, true);
});
test('appendChild(item)', function() {
test('appendTop(item)', function() {
var proj = paper.project;
var path = new Path();
proj.activeLayer.appendChild(path);
proj.activeLayer.appendTop(path);
equals(function() {
return proj.activeLayer.children.length;
}, 1);
@ -55,7 +55,7 @@ test('item.parent / item.isChild / item.isParent', function() {
var proj = paper.project;
var secondDoc = new Project();
var path = new Path();
proj.activeLayer.appendChild(path);
proj.activeLayer.appendTop(path);
equals(function() {
return proj.activeLayer.children.indexOf(path) != -1;
}, true);