Test that the community store commit is not send if community.name is not ''

This commit is contained in:
elweyn 2021-10-29 12:54:11 +02:00
parent b26120a407
commit 37c90ae6a5

View File

@ -106,12 +106,14 @@ describe('Login', () => {
describe('Community Data', () => { describe('Community Data', () => {
beforeEach(() => { beforeEach(() => {
jest.clearAllMocks()
mocks.$store.state.community = { mocks.$store.state.community = {
name: 'Gradido Entwicklung', name: 'Gradido Entwicklung',
url: 'http://localhost/vue/', url: 'http://localhost/vue/',
registerUrl: 'http://localhost/vue/register', registerUrl: 'http://localhost/vue/register',
description: 'Die lokale Entwicklungsumgebung von Gradido.', description: 'Die lokale Entwicklungsumgebung von Gradido.',
} }
wrapper = Wrapper()
}) })
it('has a Community name', () => { it('has a Community name', () => {
@ -123,6 +125,10 @@ describe('Login', () => {
'Die lokale Entwicklungsumgebung von Gradido.', 'Die lokale Entwicklungsumgebung von Gradido.',
) )
}) })
it('does not update community', () => {
expect(mockStoreCommit).not.toBeCalled()
})
}) })
describe('links', () => { describe('links', () => {