2018-05-16 14:59:03 +00:00
|
|
|
/**
|
|
|
|
* External dependencies
|
|
|
|
*
|
|
|
|
* @format
|
|
|
|
*/
|
|
|
|
|
|
|
|
import { shallow } from 'enzyme';
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Internal dependencies
|
|
|
|
*/
|
|
|
|
import Card from '../';
|
|
|
|
|
|
|
|
describe( 'Card', () => {
|
|
|
|
test( 'should have correct title', () => {
|
|
|
|
const card = <Card title="A Card Example" />;
|
|
|
|
expect( card.props.title ).toBe( 'A Card Example' );
|
|
|
|
} );
|
|
|
|
|
|
|
|
test( 'should have correct class', () => {
|
|
|
|
const card = shallow( <Card title="A Card Example" /> );
|
2018-06-01 14:35:18 +00:00
|
|
|
expect( card.hasClass( 'woocommerce-card' ) ).toBe( true );
|
2018-05-16 14:59:03 +00:00
|
|
|
} );
|
|
|
|
} );
|