mirror of
https://github.com/IT4Change/gradido.git
synced 2026-02-06 09:56:05 +00:00
51 lines
1002 B
JavaScript
51 lines
1002 B
JavaScript
import { mount } from '@vue/test-utils'
|
|
import RightSide from './RightSide'
|
|
|
|
const localVue = global.localVue
|
|
|
|
describe('RightSide', () => {
|
|
let wrapper
|
|
|
|
const mocks = {
|
|
$route: {
|
|
path: '/community/contribute',
|
|
},
|
|
}
|
|
|
|
const Wrapper = () => {
|
|
return mount(RightSide, { localVue, mocks })
|
|
}
|
|
|
|
describe('at /community/contribute', () => {
|
|
beforeEach(() => {
|
|
wrapper = Wrapper()
|
|
})
|
|
|
|
it('has name set to "community"', () => {
|
|
expect(wrapper.vm.name).toBe('community')
|
|
})
|
|
})
|
|
|
|
describe('at /settings', () => {
|
|
beforeEach(() => {
|
|
mocks.$route.path = '/settings'
|
|
wrapper = Wrapper()
|
|
})
|
|
|
|
it('has name set to "empty"', () => {
|
|
expect(wrapper.vm.name).toBe('empty')
|
|
})
|
|
})
|
|
|
|
describe('at /overview', () => {
|
|
beforeEach(() => {
|
|
mocks.$route.path = '/overview'
|
|
wrapper = Wrapper()
|
|
})
|
|
|
|
it('has name set to "transactions"', () => {
|
|
expect(wrapper.vm.name).toBe('transactions')
|
|
})
|
|
})
|
|
})
|