mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2025-12-13 07:46:06 +00:00
fixed specs, test ok
This commit is contained in:
parent
55ce9c1afb
commit
a5d76c26ae
@ -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()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user