diff options
author | Luke "Jared" Bennett <lbennett@gitlab.com> | 2017-04-12 09:18:22 +0100 |
---|---|---|
committer | Luke "Jared" Bennett <lbennett@gitlab.com> | 2017-04-12 09:18:22 +0100 |
commit | 606275da6f1245e7e2dd790a2679653aea6b9a11 (patch) | |
tree | 2ffa13902ea1c57d84804e1b390ce9fd5fe8807b | |
parent | 04eaed8088a398aee0954935752a99ac7721bb4f (diff) | |
download | gitlab-ce-606275da6f1245e7e2dd790a2679653aea6b9a11.tar.gz |
Update specs
-rw-r--r-- | spec/javascripts/droplab/constants_spec.js | 6 | ||||
-rw-r--r-- | spec/javascripts/droplab/drop_down_spec.js | 4 |
2 files changed, 8 insertions, 2 deletions
diff --git a/spec/javascripts/droplab/constants_spec.js b/spec/javascripts/droplab/constants_spec.js index 35239e4fb8e..c526e98748e 100644 --- a/spec/javascripts/droplab/constants_spec.js +++ b/spec/javascripts/droplab/constants_spec.js @@ -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); + }); + }); }); diff --git a/spec/javascripts/droplab/drop_down_spec.js b/spec/javascripts/droplab/drop_down_spec.js index 802e2435672..1b658aa6701 100644 --- a/spec/javascripts/droplab/drop_down_spec.js +++ b/spec/javascripts/droplab/drop_down_spec.js @@ -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 () { |