2012-05-01 00:04:49 +00:00
|
|
|
module( 've.ce.LeafNode' );
|
|
|
|
|
|
|
|
/* Stubs */
|
|
|
|
|
|
|
|
ve.ce.LeafNodeStub = function( model ) {
|
|
|
|
// Inheritance
|
|
|
|
ve.ce.LeafNode.call( this, model );
|
|
|
|
};
|
|
|
|
|
|
|
|
ve.extendClass( ve.ce.LeafNodeStub, ve.ce.LeafNode );
|
|
|
|
|
2012-05-02 20:58:50 +00:00
|
|
|
ve.ce.factory.register( 'leaf-stub', ve.ce.BranchNodeStub );
|
|
|
|
|
2012-05-01 00:04:49 +00:00
|
|
|
/* Tests */
|
|
|
|
|
2012-05-02 22:59:43 +00:00
|
|
|
test( 'render', 1, function() {
|
|
|
|
var node = new ve.ce.LeafNodeStub( new ve.dm.LeafNodeStub() );
|
|
|
|
console.log( node );
|
|
|
|
raises(
|
|
|
|
function() {
|
|
|
|
node.render();
|
|
|
|
},
|
|
|
|
/^ve.ce.LeafNode.render not implemented in this subclass: /,
|
|
|
|
'throws exception if called'
|
|
|
|
);
|
2012-05-01 00:04:49 +00:00
|
|
|
} );
|