mediawiki-extensions-Visual.../tests/ve2/ce/ve.ce.LeafNode.test.js
Trevor Parscal 7168b4e041 Removed duplicate node rules from tests
These methods are wrappers for the model methods where the rules are actually being applied

Change-Id: I08be359010fa9fa81cd3a8aa5152083f92dc0b9c
2012-05-10 14:57:52 -07:00

25 lines
594 B
JavaScript

module( 've.ce.LeafNode' );
/* Stubs */
ve.ce.LeafNodeStub = function( model ) {
// Inheritance
ve.ce.LeafNode.call( this, 'leaf-stub', model );
};
ve.extendClass( ve.ce.LeafNodeStub, ve.ce.LeafNode );
ve.ce.factory.register( 'leaf-stub', ve.ce.LeafNodeStub );
/* Tests */
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 );
} );