|
| 1 | +import React from 'react'; |
| 2 | +import { shallow } from 'enzyme'; |
| 3 | +import IconAdobeSign from '../IconAdobeSign'; |
| 4 | + |
| 5 | +describe('icons/adobe-sign/IconAdobeSign', () => { |
| 6 | + const getWrapper = (props = {}) => shallow(<IconAdobeSign {...props} />); |
| 7 | + |
| 8 | + test('should correctly render default icon', () => { |
| 9 | + const wrapper = getWrapper(); |
| 10 | + |
| 11 | + expect(wrapper.is('AccessibleSVG')).toBe(true); |
| 12 | + expect(wrapper.hasClass('icon-adobe-sign')).toBe(true); |
| 13 | + expect(wrapper.prop('height')).toEqual(30); |
| 14 | + expect(wrapper.prop('width')).toEqual(30); |
| 15 | + }); |
| 16 | + |
| 17 | + test('should correctly render icon with specified class', () => { |
| 18 | + const className = 'test'; |
| 19 | + const wrapper = getWrapper({ className }); |
| 20 | + |
| 21 | + expect(wrapper.hasClass(className)).toBe(true); |
| 22 | + }); |
| 23 | + |
| 24 | + test('should correctly render icon with specified height', () => { |
| 25 | + const height = 17; |
| 26 | + const wrapper = getWrapper({ height }); |
| 27 | + |
| 28 | + expect(wrapper.prop('height')).toEqual(height); |
| 29 | + }); |
| 30 | + |
| 31 | + test('should correctly render icon with specified title', () => { |
| 32 | + const title = 'fool'; |
| 33 | + const wrapper = getWrapper({ title }); |
| 34 | + |
| 35 | + expect(wrapper.prop('title')).toEqual(title); |
| 36 | + }); |
| 37 | + |
| 38 | + test('should correctly render icon with specified width', () => { |
| 39 | + const width = 17; |
| 40 | + const wrapper = getWrapper({ width }); |
| 41 | + |
| 42 | + expect(wrapper.prop('width')).toEqual(width); |
| 43 | + }); |
| 44 | +}); |
0 commit comments