Feature: Ability to set an account name (#667)
* Ability to change the account name * Ability to set a language to the account Addresses: #667 #307 Co-authored-by: Pranav Raj Sreepuram <pranavrajs@gmail.com>
This commit is contained in:
committed by
GitHub
parent
a1a81e3799
commit
99eaf59509
@@ -0,0 +1,30 @@
|
||||
import * as types from '../../../mutation-types';
|
||||
import { mutations } from '../../accounts';
|
||||
|
||||
const accountData = {
|
||||
id: 1,
|
||||
name: 'Company one',
|
||||
locale: 'en',
|
||||
};
|
||||
|
||||
describe('#mutations', () => {
|
||||
describe('#ADD_ACCOUNT', () => {
|
||||
it('push contact data to the store', () => {
|
||||
const state = {
|
||||
records: [],
|
||||
};
|
||||
mutations[types.default.ADD_ACCOUNT](state, accountData);
|
||||
expect(state.records).toEqual([accountData]);
|
||||
});
|
||||
});
|
||||
|
||||
describe('#EDIT_ACCOUNT', () => {
|
||||
it('update contact', () => {
|
||||
const state = {
|
||||
records: [{ ...accountData, locale: 'fr' }],
|
||||
};
|
||||
mutations[types.default.EDIT_ACCOUNT](state, accountData);
|
||||
expect(state.records).toEqual([accountData]);
|
||||
});
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user