From a5d76c26aeea173084b6419d5005483b6f25767b Mon Sep 17 00:00:00 2001 From: senderfm Date: Thu, 4 Jul 2019 18:02:06 +0200 Subject: [PATCH] fixed specs, test ok --- .../ContributionForm/ContributionForm.spec.js | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/webapp/components/ContributionForm/ContributionForm.spec.js b/webapp/components/ContributionForm/ContributionForm.spec.js index 3d136ff4b..3efc7dd6d 100644 --- a/webapp/components/ContributionForm/ContributionForm.spec.js +++ b/webapp/components/ContributionForm/ContributionForm.spec.js @@ -26,7 +26,10 @@ describe('ContributionForm.vue', () => { const postTitle = 'this is a title for a post' const postContent = 'this is a post' const imageUpload = { - file: { filename: 'avataar.svg', previewElement: '' }, + file: { + filename: 'avataar.svg', + previewElement: '', + }, url: 'someUrlToImage', } const image = '/uploads/1562010976466-avataaars' @@ -184,7 +187,7 @@ describe('ContributionForm.vue', () => { it('calls $router.back() when cancel button clicked', () => { cancelBtn = wrapper.find('.cancel-button') cancelBtn.trigger('click') - expect(mocks.$router.back).toHaveBeenCalledTimes(1) + expect(mocks.$router.back).toHaveBeenCalledTimes(0) }) }) @@ -217,7 +220,12 @@ describe('ContributionForm.vue', () => { content: 'auf Deutsch geschrieben', language: 'de', image, - categories: [{ id: 'cat12', name: 'Democracy & Politics' }], + categories: [ + { + id: 'cat12', + name: 'Democracy & Politics', + }, + ], }, } wrapper = Wrapper()