Skip to content

Commit

Permalink
fix broken test
Browse files Browse the repository at this point in the history
  • Loading branch information
Aaron Carlino committed Sep 1, 2017
1 parent a1c0fb0 commit a060efc
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions client/src/components/UploadField/tests/UploadFieldItem-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
});
});
Expand Down

0 comments on commit a060efc

Please sign in to comment.