Skip to content

Commit

Permalink
Add the test for the recreate event type
Browse files Browse the repository at this point in the history
  • Loading branch information
armiiller committed Nov 12, 2024
1 parent 6bd0178 commit 77644b5
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions test/models/pager_tree/integrations/datadog/v3_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 77644b5

Please sign in to comment.