0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-20 22:42:53 -05:00
ghost/test/unit/helpers/template_spec.js
Hannah Wolfe 7f1d3ebc07
Move tests from core to root (#11700)
- move all test files from core/test to test/
- updated all imports and other references
- all code inside of core/ is then application code
- tests are correctly at the root level
- consistent with other repos/projects

Co-authored-by: Kevin Ansfield <kevin@lookingsideways.co.uk>
2020-03-30 16:26:47 +01:00

14 lines
523 B
JavaScript

var should = require('should'),
hbs = require('../../../core/frontend/services/themes/engine'),
template = require('../../../core/frontend/helpers/template');
describe('Helpers Template', function () {
it('can execute a template', function () {
hbs.registerPartial('test', '<h1>Hello {{name}}</h1>');
var safeString = template.execute('test', {name: 'world'});
should.exist(safeString);
safeString.should.have.property('string').and.equal('<h1>Hello world</h1>');
});
});