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

import { Image } from '../Image'

describe('<Image />', () => {
  it('mounts', () => {
    const src = 'https://placekitten.com/200/300'
    const image = mount(<Image source={src} alt="Kitten" />)
    expect(image).not.toBeNull()
  })

  it('renders an img component', () => {
    const src = 'https://placekitten.com/200/300'
    const image = mount(<Image source={src} alt="Kitten" />)
    expect(image).toContainReactComponent('img', {
      src: src
    })
  })
})
