Commit 5e4d02ba authored by Mike Greiling's avatar Mike Greiling

fix tests in comment_type_toggle_spec.js

parent 8a713b37
import CommentTypeToggle from '~/comment_type_toggle'; import CommentTypeToggle from '~/comment_type_toggle';
import * as dropLabSrc from '~/droplab/drop_lab';
import InputSetter from '~/droplab/plugins/input_setter'; import InputSetter from '~/droplab/plugins/input_setter';
describe('CommentTypeToggle', function () { describe('CommentTypeToggle', function () {
...@@ -59,14 +58,14 @@ describe('CommentTypeToggle', function () { ...@@ -59,14 +58,14 @@ describe('CommentTypeToggle', function () {
this.droplab = jasmine.createSpyObj('droplab', ['init']); 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); spyOn(this.commentTypeToggle, 'setConfig').and.returnValue(this.config);
CommentTypeToggle.prototype.initDroplab.call(this.commentTypeToggle); CommentTypeToggle.prototype.initDroplab.call(this.commentTypeToggle);
}); });
it('should instantiate a DropLab instance', function () { it('should instantiate a DropLab instance', function () {
expect(dropLabSrc.default).toHaveBeenCalled(); expect(this.droplabConstructor).toHaveBeenCalled();
}); });
it('should set .droplab', function () { it('should set .droplab', function () {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment