diff options
| author | ewinslow <ewinslow@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-11-02 15:24:35 +0000 | 
|---|---|---|
| committer | ewinslow <ewinslow@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-11-02 15:24:35 +0000 | 
| commit | 99b267a9fc4b023e54a9d2c8ec9bd9fe42a32e54 (patch) | |
| tree | 82fd806004e381ada0cc29c0e1165a7678215551 /engine/js/tests | |
| parent | 4f14553eb693e5130c4a87a0d521b934e2fbbc31 (diff) | |
| download | elgg-99b267a9fc4b023e54a9d2c8ec9bd9fe42a32e54.tar.gz elgg-99b267a9fc4b023e54a9d2c8ec9bd9fe42a32e54.tar.bz2  | |
Refs #2538: Renamed elgg.extendUrl to elgg.normalize_url
git-svn-id: http://code.elgg.org/elgg/trunk@7188 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine/js/tests')
| -rw-r--r-- | engine/js/tests/ElggLibTest.js | 18 | 
1 files changed, 11 insertions, 7 deletions
diff --git a/engine/js/tests/ElggLibTest.js b/engine/js/tests/ElggLibTest.js index ed4db24e1..035b60325 100644 --- a/engine/js/tests/ElggLibTest.js +++ b/engine/js/tests/ElggLibTest.js @@ -73,12 +73,16 @@ ElggLibTest.prototype.testInherit = function() {  };
  ElggLibTest.prototype.testExtendUrl = function() {
 -	var url;
 -	elgg.config.wwwroot = "http://www.elgg.org/";
 +	elgg.config.wwwroot = "http://elgg.org/";
 -	url = '';
 -	assertEquals(elgg.config.wwwroot, elgg.extendUrl(url));
 -	
 -	url = 'pg/test';
 -	assertEquals('http://www.elgg.org/pg/test', elgg.extendUrl(url));
 +	var inputs = [
 +	    [elgg.config.wwwroot, ''],
 +	    [elgg.config.wwwroot + 'pg/test', 'pg/test'],
 +	    ['http://google.com', 'http://google.com'],
 +	    ['//example.com', '//example.com'],
 +	];
 +
 +	for (var i in inputs) {
 +		assertEquals(inputs[i][0], elgg.normalize_url(inputs[i][1]));
 +	}
  };
\ No newline at end of file  | 
