Skip to content

Commit

Permalink
updates bodies for request validation tests
Browse files Browse the repository at this point in the history
  • Loading branch information
dhurley14 committed Aug 26, 2020
1 parent 4581470 commit 97be779
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ describe('create_rules_bulk', () => {
const request = requestMock.create({
method: 'post',
path: `${DETECTION_ENGINE_RULES_URL}/_bulk_create`,
body: [{ from: 'now-7m', interval: '5m', ...getCreateRulesSchemaMock(), type: 'query' }],
body: [{ from: 'now-7m', interval: '5m', ...getCreateRulesSchemaMock() }],
});
const result = server.validate(request);

Expand Down Expand Up @@ -194,7 +194,6 @@ describe('create_rules_bulk', () => {
from: 'now-3755555555555555.67s',
interval: '5m',
...getCreateRulesSchemaMock(),
type: 'query',
},
],
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ describe('create_rules', () => {
const request = requestMock.create({
method: 'post',
path: DETECTION_ENGINE_RULES_URL,
body: { from: 'now-7m', interval: '5m', ...getCreateRulesSchemaMock(), type: 'query' },
body: { from: 'now-7m', interval: '5m', ...getCreateRulesSchemaMock() },
});
const result = server.validate(request);

Expand All @@ -184,7 +184,6 @@ describe('create_rules', () => {
from: 'now-3755555555555555.67s',
interval: '5m',
...getCreateRulesSchemaMock(),
type: 'query',
},
});
const result = server.validate(request);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ describe('patch_rules_bulk', () => {
const request = requestMock.create({
method: 'patch',
path: `${DETECTION_ENGINE_RULES_URL}/_bulk_update`,
body: [{ from: 'now-7m', interval: '5m', ...getCreateRulesSchemaMock(), type: 'query' }],
body: [{ from: 'now-7m', interval: '5m', ...getCreateRulesSchemaMock() }],
});
const result = server.validate(request);

Expand All @@ -204,7 +204,6 @@ describe('patch_rules_bulk', () => {
from: 'now-3755555555555555.67s',
interval: '5m',
...getCreateRulesSchemaMock(),
type: 'query',
},
],
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ describe('patch_rules', () => {
const request = requestMock.create({
method: 'patch',
path: DETECTION_ENGINE_RULES_URL,
body: { from: 'now-7m', interval: '5m', ...getPatchRulesSchemaMock(), type: 'query' },
body: { from: 'now-7m', interval: '5m', ...getPatchRulesSchemaMock() },
});
const result = server.validate(request);

Expand All @@ -208,7 +208,6 @@ describe('patch_rules', () => {
from: 'now-3755555555555555.67s',
interval: '5m',
...getPatchRulesSchemaMock(),
type: 'query',
},
});
const result = server.validate(request);
Expand Down

0 comments on commit 97be779

Please sign in to comment.