feat: Add API module and Vuex store for Macros (#5603)
This commit is contained in:
parent
9b5c0de0ea
commit
6c160ccad5
8 changed files with 510 additions and 0 deletions
14
app/javascript/dashboard/api/specs/macros.spec.js
Normal file
14
app/javascript/dashboard/api/specs/macros.spec.js
Normal file
|
@ -0,0 +1,14 @@
|
|||
import macros from '../macros';
|
||||
import ApiClient from '../ApiClient';
|
||||
|
||||
describe('#macrosAPI', () => {
|
||||
it('creates correct instance', () => {
|
||||
expect(macros).toBeInstanceOf(ApiClient);
|
||||
expect(macros).toHaveProperty('get');
|
||||
expect(macros).toHaveProperty('create');
|
||||
expect(macros).toHaveProperty('update');
|
||||
expect(macros).toHaveProperty('delete');
|
||||
expect(macros).toHaveProperty('show');
|
||||
expect(macros.url).toBe('/api/v1/macros');
|
||||
});
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue