Update specs

This commit is contained in:
Luke "Jared" Bennett 2017-04-12 09:18:22 +01:00
parent 04eaed8088
commit 606275da6f
No known key found for this signature in database
GPG Key ID: 402ED51FB5D306C2
2 changed files with 8 additions and 2 deletions

View File

@ -26,4 +26,10 @@ describe('constants', function () {
expect(constants.ACTIVE_CLASS).toBe('droplab-item-active');
});
});
describe('TEMPLATE_REGEX', function () {
it('should be a handlebars templating syntax regex', function() {
expect(constants.TEMPLATE_REGEX).toEqual(/\{\{(.+?)\}\}/g);
});
});
});

View File

@ -429,7 +429,7 @@ describe('DropDown', function () {
this.html = 'html';
this.template = { firstChild: { outerHTML: 'outerHTML', style: {} } };
spyOn(utils, 't').and.returnValue(this.html);
spyOn(utils, 'template').and.returnValue(this.html);
spyOn(document, 'createElement').and.returnValue(this.template);
spyOn(this.dropdown, 'setImagesSrc');
@ -437,7 +437,7 @@ describe('DropDown', function () {
});
it('should call utils.t with .templateString and data', function () {
expect(utils.t).toHaveBeenCalledWith(this.templateString, this.data);
expect(utils.template).toHaveBeenCalledWith(this.templateString, this.data);
});
it('should call document.createElement', function () {