From 77644b59b8890850fe4cba29122cb34e427f5e96 Mon Sep 17 00:00:00 2001 From: Austin Miller Date: Tue, 12 Nov 2024 14:08:19 -0700 Subject: [PATCH] Add the test for the recreate event type --- test/models/pager_tree/integrations/datadog/v3_test.rb | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/test/models/pager_tree/integrations/datadog/v3_test.rb b/test/models/pager_tree/integrations/datadog/v3_test.rb index f21be7d..78fb81c 100644 --- a/test/models/pager_tree/integrations/datadog/v3_test.rb +++ b/test/models/pager_tree/integrations/datadog/v3_test.rb @@ -32,6 +32,9 @@ class Datadog::V3Test < ActiveSupport::TestCase @resolve_request = @create_request.deep_dup @resolve_request[:ALERT_TRANSITION] = "Recovered" + @retriggered_request = @create_request.deep_dup + @retriggered_request[:ALERT_TRANSITION] = "Re-Triggered" + @other_request = @create_request.deep_dup @other_request[:ALERT_TRANSITION] = "baaad" end @@ -54,6 +57,13 @@ class Datadog::V3Test < ActiveSupport::TestCase @integration.adapter_incoming_request_params = @other_request assert_equal :other, @integration.adapter_action + + @integration.adapter_incoming_request_params = @retriggered_request + assert_equal :other, @integration.adapter_action + + @integration.option_support_retriggered_event = true + @integration.adapter_incoming_request_params = @retriggered_request + assert_equal :recreate, @integration.adapter_action end test "adapter_thirdparty_id" do