Publish Vulpes Preview 15 sources for desktop, Android and Tundra
Share Gaia assets and adapters, keep private profiles and development documents local, and update both public READMEs.
This commit is contained in:
parent
93e3a48004
commit
b38dea0597
25901 changed files with 9982925 additions and 369 deletions
42
gaia/apps/network-alerts/test/unit/utils_test.js
Executable file
42
gaia/apps/network-alerts/test/unit/utils_test.js
Executable file
|
|
@ -0,0 +1,42 @@
|
|||
/* global Utils */
|
||||
|
||||
'use strict';
|
||||
|
||||
require('/js/utils.js');
|
||||
|
||||
suite('Network Alerts - Utils', function() {
|
||||
var parameters = [
|
||||
'attention.html?',
|
||||
'subject=hello%20world&',
|
||||
'body=how%20are%20you&',
|
||||
'novalue&',
|
||||
'emptyvalue='
|
||||
];
|
||||
|
||||
var expected = {
|
||||
subject: 'hello world',
|
||||
body: 'how are you',
|
||||
novalue: undefined,
|
||||
emptyvalue: ''
|
||||
};
|
||||
|
||||
test('parseParams decodes search parameters', function() {
|
||||
var subject = [ 'attention.html?' ].concat(parameters).join('');
|
||||
|
||||
var result = Utils.parseParams(subject);
|
||||
for (var key in result) {
|
||||
assert.strictEqual(result[key], expected[key]);
|
||||
}
|
||||
});
|
||||
|
||||
test('parseParams decodes hash parameters', function() {
|
||||
var subject = [ 'attention.html#' ].concat(parameters).join('');
|
||||
|
||||
var result = Utils.parseParams(subject);
|
||||
for (var key in result) {
|
||||
assert.strictEqual(result[key], expected[key]);
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
Loading…
Reference in a new issue