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

import CardWrapper from '../'
import styles from '../styles.css'

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

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

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