import React from 'react';
import { shallow } from 'enzyme';

import HTTPStatus from '.';

describe('HTTPStatus', () => {
  it('displays a colorful HTTP status code', () => {
    const nodes = [
      shallow(<HTTPStatus status={102} />),
      shallow(<HTTPStatus status={200} />),
      shallow(<HTTPStatus status={301} />),
      shallow(<HTTPStatus status={404} />),
      shallow(<HTTPStatus status={503} />),
    ];
    nodes.forEach(el => expect(el.hasClass('HTTPStatus')).toBe(true));
  });
});
