summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke "Jared" Bennett <lbennett@gitlab.com>2017-04-12 09:18:22 +0100
committerLuke "Jared" Bennett <lbennett@gitlab.com>2017-04-12 09:18:22 +0100
commit606275da6f1245e7e2dd790a2679653aea6b9a11 (patch)
tree2ffa13902ea1c57d84804e1b390ce9fd5fe8807b
parent04eaed8088a398aee0954935752a99ac7721bb4f (diff)
downloadgitlab-ce-606275da6f1245e7e2dd790a2679653aea6b9a11.tar.gz
Update specs
-rw-r--r--spec/javascripts/droplab/constants_spec.js6
-rw-r--r--spec/javascripts/droplab/drop_down_spec.js4
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 () {