aboutsummaryrefslogtreecommitdiff
path: root/engine/js/tests
diff options
context:
space:
mode:
Diffstat (limited to 'engine/js/tests')
-rw-r--r--engine/js/tests/ElggLibTest.js11
1 files changed, 11 insertions, 0 deletions
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/";