import React from 'react'
import { shallow, mount } from 'enzyme'
import ContentWrapper from './index'
import { Title, Link, Text } from './Content'

describe('components/BoxElements/TabBox/components/Content', () => {
  let mountedBox
  let title
  let text

  it('should match snapshot', () => {
    const wrapper = shallow(<ContentWrapper />)
    expect(wrapper).toMatchSnapshot()
  })

  it('should display one title', () => {
    title = shallow(<Title />)
    expect(title).toHaveLength(1)
  })

  it('should display one textual block', () => {
    text = shallow(<Text />)
    expect(text).toHaveLength(1)
  })

  it('should contain Link', () => {
    mountedBox = mount(<ContentWrapper />)
    expect(mountedBox.contains(<Link />))
  })
})
