keep persistent api - databse namings in tests (fixes tests)

This commit is contained in:
lukas 2021-01-06 17:53:57 +01:00
parent 4ca590639d
commit 0c3f9204bc

View File

@ -31,7 +31,7 @@ describe('<AddActorPopup/>', function () {
});
it('test api call and insertion of actor tiles', function () {
global.callAPIMock([{id: 1, actorname: 'test'}, {id: 2, actorname: 'test2'}]);
global.callAPIMock([{id: 1, name: 'test'}, {id: 2, name: 'test2'}]);
const wrapper = shallow(<AddActorPopup/>);
@ -44,7 +44,7 @@ describe('<AddActorPopup/>', function () {
global.callAPIMock({result: 'success'});
wrapper.setState({actors: [{actor_id: 1, actorname: 'test'}]}, () => {
wrapper.setState({actors: [{actor_id: 1, name: 'test'}]}, () => {
wrapper.find('ActorTile').dive().simulate('click');
expect(callAPI).toHaveBeenCalledTimes(1);
@ -59,7 +59,7 @@ describe('<AddActorPopup/>', function () {
global.callAPIMock({result: 'nosuccess'});
wrapper.setState({actors: [{actor_id: 1, actorname: 'test'}]}, () => {
wrapper.setState({actors: [{actor_id: 1, name: 'test'}]}, () => {
wrapper.find('ActorTile').dive().simulate('click');
expect(callAPI).toHaveBeenCalledTimes(1);