From 509134bf273c1139590c28a60e54e5b20f589c45 Mon Sep 17 00:00:00 2001 From: Lucas Tucker Date: Thu, 5 Mar 2026 10:38:55 -0500 Subject: [PATCH 1/3] Remove references to private validator functions --- lib/ipa_test_kit/reference_resolution_test.rb | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/lib/ipa_test_kit/reference_resolution_test.rb b/lib/ipa_test_kit/reference_resolution_test.rb index b45de6c..8bd0af8 100644 --- a/lib/ipa_test_kit/reference_resolution_test.rb +++ b/lib/ipa_test_kit/reference_resolution_test.rb @@ -162,19 +162,16 @@ def validate_reference_resolution(resource, reference, target_profile) def resource_is_valid_with_target_profile?(resource, target_profile) return true if target_profile.blank? - # Only need to know if the resource is valid. - # Calling resource_is_valid? causes validation errors to be logged. validator = find_validator(:default) - validator_response = validator.validate(resource, target_profile) - outcome = validator.operation_outcome_from_hl7_wrapped_response(validator_response) - message_hashes = outcome.issue&.map { |issue| validator.message_hash_from_issue(issue, resource) } || [] - - message_hashes.concat(validator.additional_validation_messages(resource, target_profile)) - - validator.filter_messages(message_hashes) - - message_hashes.none? { |message_hash| message_hash[:type] == 'error' } + # Use the validator's resource_is_valid? method with add_messages_to_runnable: false + # to validate silently without adding messages to the test output + validator.resource_is_valid?( + resource, + target_profile, + self, + add_messages_to_runnable: false + ) end end end From acafbaf33cf88cc247dd87949467f373da721480 Mon Sep 17 00:00:00 2001 From: Lucas Tucker Date: Thu, 5 Mar 2026 10:58:14 -0500 Subject: [PATCH 2/3] Use DSL reference --- lib/ipa_test_kit/reference_resolution_test.rb | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/lib/ipa_test_kit/reference_resolution_test.rb b/lib/ipa_test_kit/reference_resolution_test.rb index 8bd0af8..5848711 100644 --- a/lib/ipa_test_kit/reference_resolution_test.rb +++ b/lib/ipa_test_kit/reference_resolution_test.rb @@ -162,14 +162,12 @@ def validate_reference_resolution(resource, reference, target_profile) def resource_is_valid_with_target_profile?(resource, target_profile) return true if target_profile.blank? - validator = find_validator(:default) - - # Use the validator's resource_is_valid? method with add_messages_to_runnable: false - # to validate silently without adding messages to the test output - validator.resource_is_valid?( - resource, - target_profile, - self, + target_profile_with_version = + target_profile.include?('|') ? target_profile : "#{target_profile}|#{metadata.profile_version}" + + resource_is_valid?( + resource: resource, + profile_url: target_profile_with_version, add_messages_to_runnable: false ) end From b1ec2965e8f6d06354b25f0b3725a1bef7715784 Mon Sep 17 00:00:00 2001 From: Lucas Tucker <128156413+ljtucker@users.noreply.github.com> Date: Thu, 5 Mar 2026 11:11:38 -0500 Subject: [PATCH 3/3] Update lib/ipa_test_kit/reference_resolution_test.rb Co-authored-by: Karl Naden <86612928+karlnaden@users.noreply.github.com> --- lib/ipa_test_kit/reference_resolution_test.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ipa_test_kit/reference_resolution_test.rb b/lib/ipa_test_kit/reference_resolution_test.rb index 5848711..30d5087 100644 --- a/lib/ipa_test_kit/reference_resolution_test.rb +++ b/lib/ipa_test_kit/reference_resolution_test.rb @@ -166,7 +166,7 @@ def resource_is_valid_with_target_profile?(resource, target_profile) target_profile.include?('|') ? target_profile : "#{target_profile}|#{metadata.profile_version}" resource_is_valid?( - resource: resource, + resource:, profile_url: target_profile_with_version, add_messages_to_runnable: false )