2019-01-06 01:16:29 +00:00
|
|
|
import React from 'react';
|
|
|
|
import { shallow } from 'enzyme';
|
|
|
|
|
2019-01-16 11:35:43 +00:00
|
|
|
import { Metadata } from 'components/Metadata';
|
|
|
|
|
|
|
|
const commonProps = {
|
|
|
|
i18n: { language: 'test-lang' }
|
|
|
|
};
|
2019-01-06 01:16:29 +00:00
|
|
|
|
|
|
|
describe('Metadata', () => {
|
|
|
|
test('rendering', () => {
|
|
|
|
const component = shallow(
|
2019-01-16 11:35:43 +00:00
|
|
|
<Metadata { ...commonProps } />
|
2019-01-06 01:16:29 +00:00
|
|
|
);
|
|
|
|
expect(component).toMatchSnapshot();
|
|
|
|
});
|
|
|
|
|
2019-01-16 11:35:43 +00:00
|
|
|
test('rendering with a title and description', () => {
|
2019-01-06 01:16:29 +00:00
|
|
|
const component = shallow(
|
2019-01-16 11:35:43 +00:00
|
|
|
<Metadata
|
|
|
|
title="Testing"
|
|
|
|
description="Test description"
|
|
|
|
{ ...commonProps } />
|
2019-01-06 01:16:29 +00:00
|
|
|
);
|
|
|
|
expect(component).toMatchSnapshot();
|
|
|
|
});
|
|
|
|
});
|