import React from 'react'
import { shallow, mount } from 'enzyme'
import Address from './Address'

describe('components/EthereumNetworkLinks/Address', () => {
  it('should match snapshot', () => {
    const address = shallow(
      <Address hash="0x735782e73a14d061b651efd2d35242e55e9dfc8d" />
    )
    expect(address).toMatchSnapshot()
  })
  it('should display custom text', () => {
    const address = mount(
      <Address hash="0x735782e73a14d061b651efd2d35242e55e9dfc8d">
        custom text
      </Address>
    )
    expect(address.text()).toEqual('custom text')
  })
})
