2017-10-26 16:02:57 -04:00
|
|
|
import IssuableIndex from '~/issuable_index';
|
2019-07-09 07:46:16 -04:00
|
|
|
import issuableInitBulkUpdateSidebar from '~/issuable_init_bulk_update_sidebar';
|
2017-10-26 16:02:57 -04:00
|
|
|
|
|
|
|
describe('Issuable', () => {
|
|
|
|
describe('initBulkUpdate', () => {
|
|
|
|
it('should not set bulkUpdateSidebar', () => {
|
2019-07-09 07:46:16 -04:00
|
|
|
new IssuableIndex('issue_'); // eslint-disable-line no-new
|
2018-10-09 14:03:09 -04:00
|
|
|
|
2019-07-09 07:46:16 -04:00
|
|
|
expect(issuableInitBulkUpdateSidebar.bulkUpdateSidebar).toBeNull();
|
2016-12-15 10:07:41 -05:00
|
|
|
});
|
|
|
|
|
2017-10-26 16:02:57 -04:00
|
|
|
it('should set bulkUpdateSidebar', () => {
|
|
|
|
const element = document.createElement('div');
|
|
|
|
element.classList.add('issues-bulk-update');
|
|
|
|
document.body.appendChild(element);
|
2016-12-15 10:07:41 -05:00
|
|
|
|
2019-07-09 07:46:16 -04:00
|
|
|
new IssuableIndex('issue_'); // eslint-disable-line no-new
|
2018-10-09 14:03:09 -04:00
|
|
|
|
2019-07-09 07:46:16 -04:00
|
|
|
expect(issuableInitBulkUpdateSidebar.bulkUpdateSidebar).toBeDefined();
|
2016-12-15 10:07:41 -05:00
|
|
|
});
|
2017-10-26 16:02:57 -04:00
|
|
|
});
|
|
|
|
});
|