chore: Add AgentBot API module (#5599)
This commit is contained in:
9
app/javascript/dashboard/api/agentBots.js
Normal file
9
app/javascript/dashboard/api/agentBots.js
Normal file
@@ -0,0 +1,9 @@
|
||||
import ApiClient from './ApiClient';
|
||||
|
||||
class AgentBotsAPI extends ApiClient {
|
||||
constructor() {
|
||||
super('agent_bots', { accountScoped: true });
|
||||
}
|
||||
}
|
||||
|
||||
export default new AgentBotsAPI();
|
||||
13
app/javascript/dashboard/api/specs/agentBots.spec.js
Normal file
13
app/javascript/dashboard/api/specs/agentBots.spec.js
Normal file
@@ -0,0 +1,13 @@
|
||||
import AgentBotsAPI from '../agentBots';
|
||||
import ApiClient from '../ApiClient';
|
||||
|
||||
describe('#AgentBotsAPI', () => {
|
||||
it('creates correct instance', () => {
|
||||
expect(AgentBotsAPI).toBeInstanceOf(ApiClient);
|
||||
expect(AgentBotsAPI).toHaveProperty('get');
|
||||
expect(AgentBotsAPI).toHaveProperty('show');
|
||||
expect(AgentBotsAPI).toHaveProperty('create');
|
||||
expect(AgentBotsAPI).toHaveProperty('update');
|
||||
expect(AgentBotsAPI).toHaveProperty('delete');
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user