From 4a2721032e5adb4ad2460befd9af77be4996d2a0 Mon Sep 17 00:00:00 2001 From: ewinslow Date: Mon, 1 Nov 2010 22:11:20 +0000 Subject: Refs #2538: Added some models, inheritance, more bootstrapping code git-svn-id: http://code.elgg.org/elgg/trunk@7183 36083f99-b078-4883-b0ff-0f9b5a30f544 --- engine/js/tests/ElggLibTest.js | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'engine/js/tests/ElggLibTest.js') diff --git a/engine/js/tests/ElggLibTest.js b/engine/js/tests/ElggLibTest.js index d5474c605..920296408 100644 --- a/engine/js/tests/ElggLibTest.js +++ b/engine/js/tests/ElggLibTest.js @@ -33,6 +33,17 @@ ElggLibTest.prototype.testRequire = function() { assertNoException(function(){ elgg.require('elgg.security'); }); }; +ElggLibTest.prototype.testInherit = function() { + function Base() {} + function Child() {} + + elgg.inherit(Child, Base); + + + assertInstanceOf(Base, new Child()); + assertEquals(Child, Child.prototype.constructor); +}; + ElggLibTest.prototype.testExtendUrl = function() { var url; elgg.config.wwwroot = "http://www.elgg.org/"; -- cgit v1.2.3