Skip to content
This repository has been archived by the owner on Nov 28, 2022. It is now read-only.

Commit

Permalink
Fix IconStatus tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Dom Harrington committed Dec 6, 2017
1 parent f7a33ed commit 96fa5d3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
4 changes: 2 additions & 2 deletions packages/api-explorer-ui/__tests__/IconStatus.test.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const IconStatus = require('../src/IconStatus');

test('should display the status', () => {
const icon = shallow(<IconStatus status={200} />);
expect(icon.find('em').text()).toContain('200');
expect(icon.find('span').text()).toContain('200');
});

test('should display the message', () => {
Expand All @@ -26,5 +26,5 @@ test('should have httperror class if unsuccessful', () => {

test('should allow a string', () => {
const icon = shallow(<IconStatus status="200" />);
expect(icon.find('em').text()).toContain('200');
expect(icon.find('span').text()).toContain('200');
});
4 changes: 1 addition & 3 deletions packages/api-explorer-ui/src/IconStatus.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,7 @@ function IconStatus({ status }) {
>
<i className="fa fa-circle" />
&nbsp;{statusCode[0]}&nbsp;
<em>
{statusCode[1]}
</em>
<em>{statusCode[1]}</em>
</span>
);
}
Expand Down

0 comments on commit 96fa5d3

Please sign in to comment.