2012-05-01 00:04:49 +00:00
|
|
|
module( 've.ce.LeafNode' );
|
|
|
|
|
|
|
|
/* Stubs */
|
|
|
|
|
|
|
|
ve.ce.LeafNodeStub = function( model ) {
|
|
|
|
// Inheritance
|
2012-05-05 00:50:54 +00:00
|
|
|
ve.ce.LeafNode.call( this, 'leaf-stub', model );
|
|
|
|
};
|
|
|
|
|
2012-05-01 00:04:49 +00:00
|
|
|
ve.extendClass( ve.ce.LeafNodeStub, ve.ce.LeafNode );
|
|
|
|
|
2012-05-05 00:50:54 +00:00
|
|
|
ve.ce.factory.register( 'leaf-stub', ve.ce.LeafNodeStub );
|
2012-05-02 20:58:50 +00:00
|
|
|
|
2012-05-01 00:04:49 +00:00
|
|
|
/* Tests */
|
2012-05-05 00:50:54 +00:00
|
|
|
|
|
|
|
test( 'canHaveChildren', 1, function() {
|
|
|
|
var node = new ve.ce.LeafNodeStub( new ve.dm.LeafNodeStub() );
|
|
|
|
equal( node.canHaveChildren(), false );
|
|
|
|
} );
|
|
|
|
|
|
|
|
test( 'canHaveGrandchildren', 1, function() {
|
|
|
|
var node = new ve.ce.LeafNodeStub( new ve.dm.LeafNodeStub() );
|
|
|
|
equal( node.canHaveGrandchildren(), false );
|
|
|
|
} );
|