0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-27 22:49:56 -05:00
ghost/test/unit/services/themes/handlebars/template_spec.js

15 lines
562 B
JavaScript
Raw Normal View History

const should = require('should');
const hbs = require('../../../../../core/frontend/services/themes/engine');
const template = require('../../../../../core/frontend/services/themes/handlebars/template');
describe('Helpers Template', function () {
2014-06-04 22:26:03 +01:00
it('can execute a template', function () {
hbs.registerPartial('test', '<h1>Hello {{name}}</h1>');
const safeString = template.execute('test', {name: 'world'});
should.exist(safeString);
safeString.should.have.property('string').and.equal('<h1>Hello world</h1>');
});
});