Class: SubscriptionsTestKit::SubscriptionsR5BackportR4Server::HeartbeatConformanceTest

Inherits:
Inferno::Test
  • Object
show all
Includes:
NotificationConformanceVerification
Defined in:
lib/subscriptions_test_kit/suites/subscriptions_r5_backport_r4_server/handshake_heartbeat/heartbeat_conformance_test.rb

Instance Method Summary collapse

Methods included from NotificationConformanceVerification

#bundle_entry_reference_valid?, #check_entry_request_and_response, #check_history_bundle_request_response, #check_notification_event_additional_context, #check_notification_event_focus, #empty_event_notification_verification, #empty_notification_event_references, #empty_notification_verification, #find_all_elems, #find_elem, #full_resource_event_notification_verification, #full_resource_notification_criteria_resource_check, #full_resource_notification_event_parameter_verification, #handle_content_type_header_errors, #handle_sent_header_errors, #id_only_event_notification_verification, #id_only_notification_event_parameter_verification, #no_error_verification, #notification_header_verification, #notification_verification, #parameters_verification, #verify_full_resource_notification_bundle_entries, #verify_id_only_notification_bundle_entries

Instance Method Details

#heartbeat_period?(subscription_extensions) ⇒ Boolean



29
30
31
32
33
34
35
36
37
38
39
# File 'lib/subscriptions_test_kit/suites/subscriptions_r5_backport_r4_server/handshake_heartbeat/heartbeat_conformance_test.rb', line 29

def heartbeat_period?(subscription_extensions)
  return false if subscription_extensions.blank?

  heartbeat = subscription_extensions.find do |extension|
    extension['url'].ends_with?('/backport-heartbeat-period')
  end

  return false if heartbeat.blank?

  heartbeat['valueUnsignedInt'].present?
end