este-library-oldschool
Version:
Library for github.com/steida/este.git
22 lines • 915 B
JavaScript
// Generated by github.com/steida/coffee2closure 900.1.18
suite('este.string', function() {
var utils;
utils = este.uri.utils;
return suite('getPathAndQuery', function() {
test('should return path and query from a complete url', function() {
var s;
s = utils.getPathAndQuery('http://www.ereading.cz/cs/foobar/123?q=1&p=2#hash');
return assert.equal(s, '/cs/foobar/123?q=1&p=2');
});
test('should return path and query from a complete url without hash', function() {
var s;
s = utils.getPathAndQuery('http://www.ereading.cz/cs/foobar/123?q=1&p=2');
return assert.equal(s, '/cs/foobar/123?q=1&p=2');
});
return test('should return path and query from a complete url without hash and query', function() {
var s;
s = utils.getPathAndQuery('http://www.ereading.cz/cs/foobar/123');
return assert.equal(s, '/cs/foobar/123');
});
});
});