Skip to content

Commit

Permalink
Remove unneccessary test, no more triggerContext to be null.
Browse files Browse the repository at this point in the history
  • Loading branch information
stacey-gammon committed Sep 3, 2019
1 parent fe38f0a commit fb08367
Showing 1 changed file with 2 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ describe('ApplySiemFilterAction', () => {
});

describe('#isCompatible', () => {
test('when embeddable type is MAP_SAVED_OBJECT_TYPE and triggerContext filters exist, returns true', async () => {
test('when embeddable type is MAP_SAVED_OBJECT_TYPE and filters exist, returns true', async () => {
const action = new ApplySiemFilterAction({ applyFilterQueryFromKueryExpression });
const embeddable = {
type: MAP_SAVED_OBJECT_TYPE,
Expand All @@ -65,23 +65,7 @@ describe('ApplySiemFilterAction', () => {
}
});

test('when embeddable type is MAP_SAVED_OBJECT_TYPE and triggerContext does not exist, returns false', async () => {
const action = new ApplySiemFilterAction({ applyFilterQueryFromKueryExpression });
const embeddable = {
type: MAP_SAVED_OBJECT_TYPE,
};
if (isEmbeddable(embeddable)) {
const result = await action.isCompatible({
embeddable,
filters: [],
});
expect(result).toBe(false);
} else {
throw new Error('Invalid embeddable in unit test');
}
});

test('when embeddable type is MAP_SAVED_OBJECT_TYPE and triggerContext filters do not exist, returns false', async () => {
test('when embeddable type is MAP_SAVED_OBJECT_TYPE and filters do not exist, returns false', async () => {
const action = new ApplySiemFilterAction({ applyFilterQueryFromKueryExpression });
const embeddable = {
type: MAP_SAVED_OBJECT_TYPE,
Expand Down

0 comments on commit fb08367

Please sign in to comment.