diff options
author | Mike Greiling <mike@pixelcog.com> | 2018-04-13 17:19:09 -0500 |
---|---|---|
committer | Mike Greiling <mike@pixelcog.com> | 2018-04-23 00:54:19 -0500 |
commit | 00fc61cf11028c3b7cd93ba9c37a8b2d220c0f22 (patch) | |
tree | c12f548bfee60e6bd1e2eaf3596ec7d9b040091f /spec/javascripts/droplab | |
parent | 5e4d02ba838dd47564283d2ad7d743b793f148dc (diff) | |
download | gitlab-ce-00fc61cf11028c3b7cd93ba9c37a8b2d220c0f22.tar.gz |
fix tests in droplab/hook_spec.js
Diffstat (limited to 'spec/javascripts/droplab')
-rw-r--r-- | spec/javascripts/droplab/hook_spec.js | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/spec/javascripts/droplab/hook_spec.js b/spec/javascripts/droplab/hook_spec.js index 3d39bd0812b..5eed1db2750 100644 --- a/spec/javascripts/droplab/hook_spec.js +++ b/spec/javascripts/droplab/hook_spec.js @@ -1,5 +1,4 @@ import Hook from '~/droplab/hook'; -import * as dropdownSrc from '~/droplab/drop_down'; describe('Hook', function () { describe('class constructor', function () { @@ -10,7 +9,7 @@ describe('Hook', function () { this.config = {}; this.dropdown = {}; - spyOn(dropdownSrc, 'default').and.returnValue(this.dropdown); + this.dropdownConstructor = spyOnDependency(Hook, 'DropDown').and.returnValue(this.dropdown); this.hook = new Hook(this.trigger, this.list, this.plugins, this.config); }); @@ -24,7 +23,7 @@ describe('Hook', function () { }); it('should call DropDown constructor', function () { - expect(dropdownSrc.default).toHaveBeenCalledWith(this.list, this.config); + expect(this.dropdownConstructor).toHaveBeenCalledWith(this.list, this.config); }); it('should set .type', function () { |