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

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