|
|
@@ -166,4 +166,22 @@ test('SET_BASE_URL', t => { |
|
|
|
const baseURL = 'https://example.org'; |
|
|
|
SET_BASE_URL(state, {baseURL: baseURL}); |
|
|
|
t.is(state.baseURL, baseURL); |
|
|
|
}); |
|
|
|
|
|
|
|
test('SET_VERSION', t => { |
|
|
|
const SET_VERSION = mutations[types.SET_VERSION]; |
|
|
|
const state = { |
|
|
|
currentPassword: {version: 2}, |
|
|
|
}; |
|
|
|
SET_VERSION(state, {version: 1}); |
|
|
|
t.is(state.currentPassword.version, 1); |
|
|
|
}); |
|
|
|
|
|
|
|
test('SET_VERSION currentPassword null', t => { |
|
|
|
const SET_VERSION = mutations[types.SET_VERSION]; |
|
|
|
const state = { |
|
|
|
currentPassword: null, |
|
|
|
}; |
|
|
|
SET_VERSION(state, {version: 2}); |
|
|
|
t.is(state.currentPassword.version, 2); |
|
|
|
}); |