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

import CardContent from '../'
import styles from '../styles.css'

describe('CardContent', () => {
  it('renders children in the card', () => {
    const wrapper = shallow(<CardContent>Cool Content</CardContent>, {disableLifecycleMethods: true})
    expect(wrapper.text()).to.include('Cool Content')
  })

  it('styles the card', () => {
    const wrapper = shallow(<CardContent>Cool Content</CardContent>, {disableLifecycleMethods: true})
    expect(wrapper.prop('className')).to.equal(styles.content)
  })

  it('appends className to card', () => {
    const wrapper = shallow(<CardContent className="myClass">Cool Content</CardContent>, {disableLifecycleMethods: true})
    expect(wrapper.prop('className')).to.include('myClass')
  })
})
