Skip to content
Snippets Groups Projects

Disable file attachments for epics

Merged Clement Ho requested to merge disable-attachment-epic into master
All threads resolved!
1 file
+ 11
10
Compare changes
  • Side-by-side
  • Inline
@@ -4,11 +4,13 @@ import mountComponent from '../../../helpers/vue_mount_component_helper';
describe('toolbar', () => {
let vm;
const Toolbar = Vue.extend(toolbar);
const props = {
markdownDocsPath: '',
};
beforeEach(() => {
const Toolbar = Vue.extend(toolbar);
vm = mountComponent(Toolbar, {
markdownDocsPath: '',
});
vm = mountComponent(Toolbar, props);
});
describe('canAttachFile', () => {
@@ -16,13 +18,12 @@ describe('toolbar', () => {
expect(vm.$el.querySelector('.uploading-container')).toBeDefined();
});
it('should not render uploading-container when canAttachFile is false', (done) => {
vm.canAttachFile = false;
it('should not render uploading-container when canAttachFile is false', () => {
vm = mountComponent(Toolbar, Object.assign({}, props, {
canAttachFile: false,
}));
Vue.nextTick(() => {
expect(vm.$el.querySelector('.uploading-container')).toBeNull();
done();
});
expect(vm.$el.querySelector('.uploading-container')).toBeNull();
});
});
});
Loading