import React from 'react'
import { shallow } from 'enzyme'
import DefaultButton from './index'

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

  it('should display a spinner when `isLoading` is set to true', () => {
    const wrapper = shallow(<DefaultButton isLoading />)
    expect(wrapper.find('Spinner')).toHaveLength(1)
  })
})
