[refactor,util][s]: move query string parsing and manipulation utilities into util.js.
This commit is contained in:
@@ -2,10 +2,10 @@
|
||||
module("Util");
|
||||
|
||||
test('parseHashUrl', function () {
|
||||
var out = recline.View.parseHashUrl('graph?x=y');
|
||||
var out = recline.Util.parseHashUrl('graph?x=y');
|
||||
equal(out.path, 'graph');
|
||||
equal(out.query, '?x=y');
|
||||
var out = recline.View.parseHashUrl('graph');
|
||||
var out = recline.Util.parseHashUrl('graph');
|
||||
equal(out.path, 'graph');
|
||||
equal(out.query, '');
|
||||
});
|
||||
@@ -15,7 +15,7 @@ test('composeQueryString', function () {
|
||||
x: 'y',
|
||||
a: 'b'
|
||||
};
|
||||
var out = recline.View.composeQueryString(params);
|
||||
var out = recline.Util.composeQueryString(params);
|
||||
equal(out, '?x=y&a=b');
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user