Whalebird-desktop-client-ma.../spec/renderer/unit/store/Login.spec.ts

27 lines
661 B
TypeScript
Raw Normal View History

2018-12-28 16:04:17 +01:00
import Login from '@/store/Login'
describe('Login', () => {
describe('mutations', () => {
let state: any
2018-12-28 16:04:17 +01:00
beforeEach(() => {
state = {
instances: [],
selectedInstance: null,
searching: false
}
})
describe('changeInstance', () => {
it('should be changed', () => {
Login.mutations.changeInstance(state, 'pleroma.io')
expect(state.selectedInstance).toEqual('pleroma.io')
})
})
describe('changeSearching', () => {
it('should be changed', () => {
Login.mutations.changeSearching(state, true)
expect(state.searching).toEqual(true)
})
})
})
})