Chatwoot/app/javascript/dashboard/api/specs/reports.spec.js
2020-12-15 23:35:03 +05:30

17 lines
646 B
JavaScript

import reports from '../reports';
import ApiClient from '../ApiClient';
describe('#Reports API', () => {
it('creates correct instance', () => {
expect(reports).toBeInstanceOf(ApiClient);
expect(reports.apiVersion).toBe('/api/v2');
expect(reports).toHaveProperty('get');
expect(reports).toHaveProperty('show');
expect(reports).toHaveProperty('create');
expect(reports).toHaveProperty('update');
expect(reports).toHaveProperty('delete');
expect(reports).toHaveProperty('getAccountReports');
expect(reports).toHaveProperty('getAccountSummary');
expect(reports).toHaveProperty('getAgentReports');
});
});