From 31a4fe4772695cbaca9f2b875adedcdaff210797 Mon Sep 17 00:00:00 2001 From: Claudio Procida Date: Mon, 29 Nov 2021 18:37:07 +0100 Subject: [PATCH] Updates tests --- .../rules_client/tests/aggregate.test.ts | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/x-pack/plugins/alerting/server/rules_client/tests/aggregate.test.ts b/x-pack/plugins/alerting/server/rules_client/tests/aggregate.test.ts index aa7386baa636..0c64907d29a8 100644 --- a/x-pack/plugins/alerting/server/rules_client/tests/aggregate.test.ts +++ b/x-pack/plugins/alerting/server/rules_client/tests/aggregate.test.ts @@ -84,6 +84,18 @@ describe('aggregate()', () => { { key: 'unknown', doc_count: 2 }, ], }, + enabled: { + buckets: [ + { key: 0, key_as_string: '0', doc_count: 2 }, + { key: 1, key_as_string: '1', doc_count: 28 }, + ], + }, + muted: { + buckets: [ + { key: 0, key_as_string: '0', doc_count: 27 }, + { key: 1, key_as_string: '1', doc_count: 3 }, + ], + }, }, }); @@ -120,6 +132,14 @@ describe('aggregate()', () => { "pending": 4, "unknown": 2, }, + "ruleEnabledStatus": Object { + "disabled": 2, + "enabled": 28, + }, + "ruleMutedStatus": Object { + "muted": 3, + "unmuted": 27, + }, } `); expect(unsecuredSavedObjectsClient.find).toHaveBeenCalledTimes(1);