diff options
author | Mike Greiling <mike@pixelcog.com> | 2018-04-14 00:14:43 +0300 |
---|---|---|
committer | Mike Greiling <mike@pixelcog.com> | 2018-04-23 08:54:19 +0300 |
commit | 5e4d02ba838dd47564283d2ad7d743b793f148dc (patch) | |
tree | b0b669f882f262797ddb47c5108d04e6c05c0ea2 /spec/javascripts/comment_type_toggle_spec.js | |
parent | 8a713b37cb45850bb7080f9c09b08bb53d4ec237 (diff) |
fix tests in comment_type_toggle_spec.js
Diffstat (limited to 'spec/javascripts/comment_type_toggle_spec.js')
-rw-r--r-- | spec/javascripts/comment_type_toggle_spec.js | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/spec/javascripts/comment_type_toggle_spec.js b/spec/javascripts/comment_type_toggle_spec.js index dfd0810d52e..0ba709298c5 100644 --- a/spec/javascripts/comment_type_toggle_spec.js +++ b/spec/javascripts/comment_type_toggle_spec.js @@ -1,5 +1,4 @@ import CommentTypeToggle from '~/comment_type_toggle'; -import * as dropLabSrc from '~/droplab/drop_lab'; import InputSetter from '~/droplab/plugins/input_setter'; describe('CommentTypeToggle', function () { @@ -59,14 +58,14 @@ describe('CommentTypeToggle', function () { this.droplab = jasmine.createSpyObj('droplab', ['init']); - spyOn(dropLabSrc, 'default').and.returnValue(this.droplab); + this.droplabConstructor = spyOnDependency(CommentTypeToggle, 'DropLab').and.returnValue(this.droplab); spyOn(this.commentTypeToggle, 'setConfig').and.returnValue(this.config); CommentTypeToggle.prototype.initDroplab.call(this.commentTypeToggle); }); it('should instantiate a DropLab instance', function () { - expect(dropLabSrc.default).toHaveBeenCalled(); + expect(this.droplabConstructor).toHaveBeenCalled(); }); it('should set .droplab', function () { |