Files
OpenMediaCenter/src/pages/ActorPage/ActorPage.test.js

28 lines
727 B
JavaScript
Raw Normal View History

import {shallow} from 'enzyme';
import React from 'react';
2020-12-29 19:39:30 +00:00
import {ActorPage} from './ActorPage';
describe('<ActorPage/>', function () {
it('renders without crashing ', function () {
2020-12-29 19:39:30 +00:00
const wrapper = shallow(<ActorPage match={{params: {id: 10}}}/>);
wrapper.unmount();
});
2020-12-29 19:39:30 +00:00
it('fetch infos', function () {
callAPIMock({
Videos: [{
MovieId: 0,
MovieName: 'test'
}], Info: {
Thumbnail: '',
Name: '',
ActorId: 0
2020-12-29 19:39:30 +00:00
}
});
2020-12-29 19:39:30 +00:00
const wrapper = shallow(<ActorPage match={{params: {id: 10}}}/>);
expect(wrapper.find('VideoContainer')).toHaveLength(1);
});
});