Skip to content
Permalink
Browse files

fix broken test

  • Loading branch information
unclecheese committed Sep 1, 2017
1 parent a1c0fb0 commit a060efccde32180317a285b0f419f817d79b38a3
Showing with 5 additions and 5 deletions.
  1. +5 −5 client/src/components/UploadField/tests/UploadFieldItem-test.js
@@ -191,21 +191,21 @@ describe('UploadFieldItem', () => {
});
});

describe('renderEditButton()', () => {
it('displays edit button', () => {
describe('renderViewButton()', () => {
it('displays view button', () => {
props.canEdit = true;
file = ReactTestUtils.renderIntoDocument(
<UploadFieldItem {...props} />
);
const button = file.renderEditButton();
const button = file.renderViewButton();
expect(button.type).toBe('button');
});
it('hides remove button when disabled', () => {
it('hides view button when disabled', () => {
props.canEdit = false;
file = ReactTestUtils.renderIntoDocument(
<UploadFieldItem {...props} />
);
const button = file.renderEditButton();
const button = file.renderViewButton();
expect(button).toBe(null);
});
});

0 comments on commit a060efc

Please sign in to comment.
You can’t perform that action at this time.