Skip to content

Use Inferno Validator Public Functions only#27

Merged
ljtucker merged 3 commits into
mainfrom
use-validator-service
Mar 5, 2026
Merged

Use Inferno Validator Public Functions only#27
ljtucker merged 3 commits into
mainfrom
use-validator-service

Conversation

@ljtucker

@ljtucker ljtucker commented Mar 4, 2026

Copy link
Copy Markdown
Contributor

Summary

Updated the reference resolution test to use the public validator service functions, rather than calling the private functions directly. Should result in no change in behavior

For proof see the following two screenshots of a validation test performing identically in both production and locally (after changes):

image image


# Only need to know if the resource is valid.
# Calling resource_is_valid? causes validation errors to be logged.
validator = find_validator(:default)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You don't have to get the validator, you can use the resource_is_valid? DSL method directly

resource_is_valid?(resource:, profile_url: target_profile, add_messages_to_runnable: false)

See the US Core version: https://github.com/inferno-framework/us-core-test-kit/blob/main/lib/us_core_test_kit/reference_resolution_test.rb#L170

@ljtucker ljtucker merged commit 95c8f39 into main Mar 5, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants