aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCash Costello <cash.costello@gmail.com>2011-11-03 20:48:12 -0400
committerCash Costello <cash.costello@gmail.com>2011-11-03 20:48:12 -0400
commit6c6994e61d0f6b29b5dcc3fda0f8af77f9a5b8e9 (patch)
treee9172d603a5e88ca7f6b4bf871d126e8c1f989f2
parent5a33143dc4d88eb2bc658cb28ca4189a1b773a56 (diff)
downloadelgg-6c6994e61d0f6b29b5dcc3fda0f8af77f9a5b8e9.tar.gz
elgg-6c6994e61d0f6b29b5dcc3fda0f8af77f9a5b8e9.tar.bz2
Fixes #4051 - fixes security token unit test and language unit tests
-rw-r--r--js/tests/ElggLanguagesTest.js2
-rw-r--r--js/tests/ElggSecurityTest.js6
2 files changed, 4 insertions, 4 deletions
diff --git a/js/tests/ElggLanguagesTest.js b/js/tests/ElggLanguagesTest.js
index 1f66fc35b..9186ff5bb 100644
--- a/js/tests/ElggLanguagesTest.js
+++ b/js/tests/ElggLanguagesTest.js
@@ -6,7 +6,7 @@ ElggLanguagesTest.prototype.setUp = function() {
//Immediately execute some dummy "returned" javascript instead of sending
//an actual ajax request
$.ajax = function(settings) {
- var lang = settings.data.js.split('/')[1];
+ var lang = settings.data.language;
elgg.config.translations[lang] = {'language':lang};
};
};
diff --git a/js/tests/ElggSecurityTest.js b/js/tests/ElggSecurityTest.js
index f1111168f..c7309d55f 100644
--- a/js/tests/ElggSecurityTest.js
+++ b/js/tests/ElggSecurityTest.js
@@ -31,10 +31,10 @@ ElggSecurityTest.prototype.testAddTokenAcceptsString = function() {
str = "__elgg_ts=" + this.ts + "&__elgg_token=" + this.token;
input = "";
- assertEquals(str, elgg.security.addToken(input));
+ assertEquals('?' + str, elgg.security.addToken(input));
- input = "data=sofar";
- assertEquals(input+'&'+str, elgg.security.addToken(input));
+ input = "?data=sofar";
+ assertEquals(input + '&' + str, elgg.security.addToken(input));
};