Skip to content

Commit

Permalink
[#2525] Add tests for jQuery.url.escape()
Browse files Browse the repository at this point in the history
  • Loading branch information
aron committed Jul 2, 2012
1 parent 9e44da7 commit ac79236
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions ckan/public/base/test/spec/plugins/jquery.url-helpers.spec.js
@@ -0,0 +1,13 @@
describe('jQuery.url', function () {
describe('jQuery.url.escape', function () {
it('should escape special characters', function () {
var target = jQuery.url.escape('&<>=?#/');
assert.equal(target, '%26%3C%3E%3D%3F%23%2F');
});

it('should convert spaces to + rather than %20', function () {
var target = jQuery.url.escape(' ');
assert.equal(target, '+');
});
});
});

0 comments on commit ac79236

Please sign in to comment.