debian-mirror-gitlab/spec/frontend/issuable_spec.js

23 lines
749 B
JavaScript
Raw Normal View History

2018-03-17 18:26:18 +05:30
import IssuableIndex from '~/issuable_index';
2019-09-30 21:07:59 +05:30
import issuableInitBulkUpdateSidebar from '~/issuable_init_bulk_update_sidebar';
2018-03-17 18:26:18 +05:30
describe('Issuable', () => {
describe('initBulkUpdate', () => {
it('should not set bulkUpdateSidebar', () => {
2019-09-30 21:07:59 +05:30
new IssuableIndex('issue_'); // eslint-disable-line no-new
2018-12-13 13:39:08 +05:30
2019-09-30 21:07:59 +05:30
expect(issuableInitBulkUpdateSidebar.bulkUpdateSidebar).toBeNull();
2017-08-17 22:00:37 +05:30
});
2018-03-17 18:26:18 +05:30
it('should set bulkUpdateSidebar', () => {
const element = document.createElement('div');
element.classList.add('issues-bulk-update');
document.body.appendChild(element);
2017-08-17 22:00:37 +05:30
2019-09-30 21:07:59 +05:30
new IssuableIndex('issue_'); // eslint-disable-line no-new
2018-12-13 13:39:08 +05:30
2019-09-30 21:07:59 +05:30
expect(issuableInitBulkUpdateSidebar.bulkUpdateSidebar).toBeDefined();
2017-08-17 22:00:37 +05:30
});
2018-03-17 18:26:18 +05:30
});
});