This commit is contained in:
2026-07-12 12:20:23 +08:00
parent 7f2d5579ff
commit f923791d39
252 changed files with 9872 additions and 647 deletions
@@ -31,8 +31,14 @@ describe('#actions', () => {
describe('#create', () => {
it('sends correct actions if API is success', async () => {
axios.post.mockResolvedValue({ data: agentList[0] });
await actions.create({ commit }, agentList[0]);
const responseAgent = {
...agentList[0],
temporary_password: 'InitialPassword1!',
};
axios.post.mockResolvedValue({ data: responseAgent });
const createdAgent = await actions.create({ commit }, agentList[0]);
expect(createdAgent).toEqual(responseAgent);
expect(commit.mock.calls).toEqual([
[types.default.SET_AGENT_CREATING_STATUS, true],
[types.default.ADD_AGENT, agentList[0]],