Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fi 3007 - subscription validation #5

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

nhcady
Copy link
Contributor

@nhcady nhcady commented Oct 28, 2024

Summary

  • Added a method to subscription_conformance_test.rb to test if the Provided URL in subscription.criteria is a valid URL and fail the test if it is not.

Testing Guidance

  • Run all rake tasks to confirm they work.
  • Run tests suite, confirmed working.

@nhcady nhcady requested review from tstrass and karlnaden October 28, 2024 16:54
@nhcady nhcady self-assigned this Oct 28, 2024
@karlnaden
Copy link
Collaborator

Add Requirement 73 to the verifies_requirements list for the test.

Comment on lines 64 to 73
assert(subscription['criteria'].present?,
assert(subscription['criteria'].present? && valid_url?(subscription['criteria']),
'The `criteria` field SHALL be populated and contain the canonical URL for the Subscription Topic.')
output subscription_topic: subscription['criteria']
Copy link
Collaborator

Choose a reason for hiding this comment

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

Looks like we no longer use output subscription_criteria anywhere, which means that:

  1. we can remove it
  2. we can move this URL check inside the subscription_verification method so that it gets run whenever subscriptions are verified. This also means you can add a test case or two to the spec test.

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