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
@@ -12,6 +12,10 @@ class Agents extends ApiClient {
emails,
});
}
resetPassword(agentId) {
return axios.post(`${this.url}/${agentId}/reset_password`);
}
}
export default new Agents();
@@ -9,6 +9,7 @@ describe('#AgentAPI', () => {
expect(agents).toHaveProperty('create');
expect(agents).toHaveProperty('update');
expect(agents).toHaveProperty('delete');
expect(agents).toHaveProperty('resetPassword');
});
describe('API calls', () => {
@@ -34,5 +35,12 @@ describe('#AgentAPI', () => {
}
);
});
it('#resetPassword', () => {
agents.resetPassword(42);
expect(axiosMock.post).toHaveBeenCalledWith(
'/api/v1/agents/42/reset_password'
);
});
});
});