aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorewinslow <ewinslow@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-11-09 01:00:12 +0000
committerewinslow <ewinslow@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-11-09 01:00:12 +0000
commit8c4fe01968aecea2ccfe6146ff580a272750e4d7 (patch)
treeec45ed11fcd7ddf25e0a3e97c72e16c72f1388a5
parent5728887b62634a0357a574d688ffeba697838d27 (diff)
downloadelgg-8c4fe01968aecea2ccfe6146ff580a272750e4d7.tar.gz
elgg-8c4fe01968aecea2ccfe6146ff580a272750e4d7.tar.bz2
Renamed test method appropriately. jslinted ElggLibTest.
git-svn-id: http://code.elgg.org/elgg/trunk@7267 36083f99-b078-4883-b0ff-0f9b5a30f544
-rw-r--r--js/tests/ElggLibTest.js24
1 files changed, 14 insertions, 10 deletions
diff --git a/js/tests/ElggLibTest.js b/js/tests/ElggLibTest.js
index 035b60325..e810a47fb 100644
--- a/js/tests/ElggLibTest.js
+++ b/js/tests/ElggLibTest.js
@@ -15,7 +15,7 @@ ElggLibTest.prototype.testAssertTypeOf = function() {
['boolean', false],
['undefined', undefined],
['number', 0],
- ['function', function() {}],
+ ['function', elgg.nullFunction],
];
for (var i in noexceptions) {
@@ -26,7 +26,7 @@ ElggLibTest.prototype.testAssertTypeOf = function() {
var exceptions = [
['function', {}],
- ['object', function() {}],
+ ['object', elgg.nullFunction],
];
for (var i in exceptions) {
@@ -50,19 +50,23 @@ ElggLibTest.prototype.testProvide = function() {
assertEquals(str, foo.bar.baz.oof);
};
-ElggLibTest.prototype.testRequire = function() {
- /* Try requiring bogus input */
+/**
+ * Try requiring bogus input
+ */
+ElggLibTest.prototype.testRequire = function () {
assertException(function(){ elgg.require(''); });
assertException(function(){ elgg.require('garbage'); });
assertException(function(){ elgg.require('gar.ba.ge'); });
- assertNoException(function(){ elgg.require('jQuery'); });
- assertNoException(function(){ elgg.require('elgg'); });
- assertNoException(function(){ elgg.require('elgg.config'); });
- assertNoException(function(){ elgg.require('elgg.security'); });
+ assertNoException(function(){
+ elgg.require('jQuery');
+ elgg.require('elgg');
+ elgg.require('elgg.config');
+ elgg.require('elgg.security');
+ });
};
-ElggLibTest.prototype.testInherit = function() {
+ElggLibTest.prototype.testInherit = function () {
function Base() {}
function Child() {}
@@ -72,7 +76,7 @@ ElggLibTest.prototype.testInherit = function() {
assertEquals(Child, Child.prototype.constructor);
};
-ElggLibTest.prototype.testExtendUrl = function() {
+ElggLibTest.prototype.testNormalizeUrl = function() {
elgg.config.wwwroot = "http://elgg.org/";
var inputs = [