test group (#4118)

This commit is contained in:
Andrea Bogazzi 2017-07-22 11:43:10 +02:00 committed by GitHub
parent c9b562de9e
commit ae778e6887

View file

@ -386,6 +386,17 @@
});
});
asyncTest('fromObject does not delete objects from source', function() {
var group = makeGroupWith2ObjectsWithOpacity();
var groupObject = group.toObject();
fabric.Group.fromObject(groupObject, function(newGroupFromObject) {
equal(newGroupFromObject.objects, undefined, 'the objects array has not been pulled in');
notEqual(groupObject.objects, undefined, 'the objects array has not been deleted from object source');
start();
});
});
test('toSVG', function() {
var group = makeGroupWith2Objects();
ok(typeof group.toSVG == 'function');