mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-03-11 02:12:21 -05:00
- The index.js file was actually loader code - It was mainly used by the unit tests, which needed to be rewritten to get each helper individually
15 lines
472 B
JavaScript
15 lines
472 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);
|
|
});
|
|
});
|