mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-22 18:31:57 +03:00
95d27e7f58
- this is a small part of a bit of cleanup of our test files - the goal is to make the existing tests clearer with a view to making it easier to write more tests - this makes the test structure follow the codebase structure more closely - eventually we will colocate the frontend tests with the frontend code
16 lines
475 B
JavaScript
16 lines
475 B
JavaScript
const should = require('should');
|
|
|
|
// Stuff we are testing
|
|
const encode = require('../../../../core/frontend/helpers/encode');
|
|
|
|
describe('{{encode}} helper', function () {
|
|
it('can escape URI', function () {
|
|
const uri = '$pecial!Charact3r(De[iver]y)Foo #Bar';
|
|
const expected = '%24pecial!Charact3r(De%5Biver%5Dy)Foo%20%23Bar';
|
|
const escaped = encode(uri);
|
|
|
|
should.exist(escaped);
|
|
String(escaped).should.equal(expected);
|
|
});
|
|
});
|