content: /* eslint-env mocha */
  
  import React from 'react';
  import { expect } from 'chai';
  import { shallow, mount } from 'enzyme';
  import sinon from 'sinon';
  import jsdom from 'jsdom';
  import { CommentBox } from '../../../src/js/components/characterDetails/commentBox';
  
  describe('<CommentBox />', () => {
    describe('the user is logged in', () => {
      let wrapper;
      let login;
      let characterDetails;
      beforeEach(() => {
        login = {
          status: 'LOGGED_IN'
        };
        characterDetails = {
          data: {
            name: 'Spiderman'
          }
        };
        wrapper = shallow(<CommentBox login={login} characterDetails={characterDetails} />);
      });
  
      it('should render a form', () => {
        expect(wrapper.find('form').length).to.equal(1);
      });
    });
  
    describe('the user is logged out', () => {
      let wrapper;
      let login;
      beforeEach(() => {
        login = {
          status: 'LOGGED_OUT'
        };
        wrapper = shallow(<CommentBox login={login} />);
      });
  
      it('should not render a form', () => {
        expect(wrapper.find('form').length).to.equal(0);
      });
    });
  });
  