[Refactor] Cleanup agent store and actions (#373)
* Cleanup agent store and actions * Move set/create/update/destroy to helpers * Update mutation specs * Add specs for API helper * Fix edit/delete action visibility * Add actions specs * Remove unused API helpers * Remove duplicates * Remove duplicates * Fix duplicate
This commit is contained in:
parent
a92e3817f8
commit
2ce7438c79
26 changed files with 613 additions and 576 deletions
13
app/javascript/dashboard/api/specs/agents.spec.js
Normal file
13
app/javascript/dashboard/api/specs/agents.spec.js
Normal file
|
@ -0,0 +1,13 @@
|
|||
import agents from '../agents';
|
||||
import ApiClient from '../ApiClient';
|
||||
|
||||
describe('#AgentAPI', () => {
|
||||
it('creates correct instance', () => {
|
||||
expect(agents).toBeInstanceOf(ApiClient);
|
||||
expect(agents).toHaveProperty('get');
|
||||
expect(agents).toHaveProperty('show');
|
||||
expect(agents).toHaveProperty('create');
|
||||
expect(agents).toHaveProperty('update');
|
||||
expect(agents).toHaveProperty('delete');
|
||||
});
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue