diff --git a/test/models/pager_tree/integrations/hetrix_tools/v3_test.rb b/test/models/pager_tree/integrations/hetrix_tools/v3_test.rb index 5d4e54f..cc2e910 100644 --- a/test/models/pager_tree/integrations/hetrix_tools/v3_test.rb +++ b/test/models/pager_tree/integrations/hetrix_tools/v3_test.rb @@ -202,5 +202,14 @@ class HetrixTools::V3Test < ActiveSupport::TestCase actual.thirdparty_id = nil assert_equal true_alert.to_json, actual.to_json end + + test "blocking_incoming" do + assert @integration.option_authentication_token.blank? + assert_not @integration.adapter_should_block_incoming?(OpenStruct.new({headers: {"Authorization" => ""}})) + + @integration.option_authentication_token = "abc123456" + assert @integration.adapter_should_block_incoming?(OpenStruct.new({headers: {"Authorization" => ""}})) + assert_not @integration.adapter_should_block_incoming?(OpenStruct.new({headers: {"Authorization" => "Bearer abc123456"}})) + end end end