Remove useless closeReopenReport specs
This commit is contained in:
parent
10a5f97f02
commit
3ce6960b35
1 changed files with 0 additions and 34 deletions
|
@ -1,6 +1,5 @@
|
|||
/* eslint-disable space-before-function-paren, one-var, one-var-declaration-per-line, no-use-before-define, comma-dangle, max-len */
|
||||
import Issue from '~/issue';
|
||||
import CloseReopenReportToggle from '~/close_reopen_report_toggle';
|
||||
import '~/lib/utils/text_utility';
|
||||
|
||||
describe('Issue', function() {
|
||||
|
@ -189,37 +188,4 @@ describe('Issue', function() {
|
|||
});
|
||||
});
|
||||
});
|
||||
|
||||
describe('units', () => {
|
||||
describe('class constructor', () => {
|
||||
it('calls .initCloseReopenReport', () => {
|
||||
spyOn(Issue.prototype, 'initCloseReopenReport');
|
||||
|
||||
new Issue(); // eslint-disable-line no-new
|
||||
|
||||
expect(Issue.prototype.initCloseReopenReport).toHaveBeenCalled();
|
||||
});
|
||||
});
|
||||
|
||||
describe('initCloseReopenReport', () => {
|
||||
it('calls .initDroplab', () => {
|
||||
const container = jasmine.createSpyObj('container', ['querySelector']);
|
||||
const dropdownTrigger = {};
|
||||
const dropdownList = {};
|
||||
const button = {};
|
||||
|
||||
spyOn(document, 'querySelector').and.returnValue(container);
|
||||
spyOn(CloseReopenReportToggle.prototype, 'initDroplab');
|
||||
container.querySelector.and.returnValues(dropdownTrigger, dropdownList, button);
|
||||
|
||||
Issue.prototype.initCloseReopenReport();
|
||||
|
||||
expect(document.querySelector).toHaveBeenCalledWith('.js-issuable-close-dropdown');
|
||||
expect(container.querySelector).toHaveBeenCalledWith('.js-issuable-close-toggle');
|
||||
expect(container.querySelector).toHaveBeenCalledWith('.js-issuable-close-menu');
|
||||
expect(container.querySelector).toHaveBeenCalledWith('.js-issuable-close-button');
|
||||
expect(CloseReopenReportToggle.prototype.initDroplab).toHaveBeenCalled();
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue