import React from 'react'
import { mount } from '../../../test/utils'

import { Header } from '../Header'

describe('<Header />', () => {
  it('mounts', () => {
    const spinner = mount(<Header />)
    expect(spinner).not.toBeNull()
  })

  it('renders an button if upwards if callback is passed', () => {
    const callback = { onAction: () => { } }
    const spinner = mount(<Header upward={callback} />)
    expect(spinner).toContainReactComponent('button')
  })

  it('renders an close if upwards if callback is passed', () => {
    const callback = { onAction: () => { } }
    const spinner = mount(<Header upward={callback} />)
    expect(spinner).toContainReactComponent('button')
  })
})
