mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 17:59:23 -04:00
* Fix 500 and add test for it * Return an empty object so the logic later will still execute * Update tests
This commit is contained in:
parent
a1d2643ad2
commit
cf9fdaac5e
2 changed files with 15 additions and 3 deletions
|
@ -120,13 +120,25 @@ export default function ({ getService }) {
|
|||
});
|
||||
|
||||
describe('exclude usage', () => {
|
||||
it('should exclude usage from the API response', () => {
|
||||
it('should include an empty usage object from the API response', () => {
|
||||
return supertest
|
||||
.get('/api/stats?extended&exclude_usage')
|
||||
.expect('Content-Type', /json/)
|
||||
.expect(200)
|
||||
.then(({ body }) => {
|
||||
expect(body).to.not.have.property('usage');
|
||||
expect(body).to.have.property('usage');
|
||||
expect(body.usage).to.eql({});
|
||||
});
|
||||
});
|
||||
|
||||
it('should include an empty usage object from the API response if `legacy` is provided', () => {
|
||||
return supertest
|
||||
.get('/api/stats?extended&exclude_usage&legacy')
|
||||
.expect('Content-Type', /json/)
|
||||
.expect(200)
|
||||
.then(({ body }) => {
|
||||
expect(body).to.have.property('usage');
|
||||
expect(body.usage).to.eql({});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue