blob: 67b192c118ee04d328d6db6cb378713c3f4c6800 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
import React from 'react'
import assert from 'assert'
import { shallow } from 'enzyme'
import NetworkDropdownIcon from '../components/network-dropdown-icon'
describe('Network Dropdown Icon', () => {
let wrapper
beforeEach(() => {
wrapper = shallow(<NetworkDropdownIcon
backgroundColor = {'red'}
isSelected = {false}
innerBorder = {'none'}
diameter = {'12'}
/>)
})
it('adds style props based on props', () => {
const styleProp = wrapper.find('.menu-icon-circle').children().prop('style')
assert.equal(styleProp.background, 'red')
assert.equal(styleProp.border, 'none')
assert.equal(styleProp.height, '12px')
assert.equal(styleProp.width, '12px')
})
})
|