initiatived21/d21

View on GitHub
client/app/PledgeData/components/InitiatorWithImage_test.js

Summary

Maintainability
A
0 mins
Test Coverage
import React           from 'react'
import { shallow }     from 'enzyme'
import InitiatorWithImage from './InitiatorWithImage'

describe('<InitiatorWithImage />', function () {
  const props = {
    imagePath: 'dummy'
  }

  it('should render', function () {
    const wrapper = shallow(<InitiatorWithImage {...props}>Max Mustermann</InitiatorWithImage>)

    wrapper.hasClass('o-media').should.be.true
    wrapper.find('p').at(0).text().should.equal('Initiator')
    wrapper.find('p').at(1).text().should.equal('Max Mustermann')
  })
})