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

Fix content schema tests #2666

Merged
merged 1 commit into from
Jan 17, 2023
Merged

Fix content schema tests #2666

merged 1 commit into from
Jan 17, 2023

Conversation

hannako
Copy link
Contributor

@hannako hannako commented Jan 17, 2023

The test file test/contracts/govuk_content_schemas_test.rb was not actually testing anything because there was a typo in the support file, such that GovukSchemas::Example.find_all(supported_schemas) was returning []

⚠️ This repo is Continuously Deployed: make sure you follow the guidance ⚠️

Follow these steps if you are doing a Rails upgrade.
https://trello.com/c/1gPCngv0/1136-migrate-service-manual-frontend-templates-into-government-frontend-m

There was a typo in the support file, such that
GovukSchemas::Example.find_all(supported_schemas) was returning []
because the `find_all` method expects a single string param.
https://github.com/alphagov/govuk_schemas/blob/4fef0aa95be24c3534a00b622a59ea7f1e8175fa/lib/govuk_schemas/example.rb#L5

Also removes redirect, as there is no frontend rendering.
https://github.com/alphagov/publishing-api/tree/main/content_schemas/examples/redirect

Minitest won't not run tests of the same name, and multiple schema examples have
the same basepath. Hence adding in the index to the iterator.
@govuk-ci govuk-ci temporarily deployed to government-frontend-pr-2666 January 17, 2023 11:16 Inactive
@hannako hannako changed the title Re-enable content schema tests Fix content schema tests Jan 17, 2023
@hannako hannako merged commit 411c7ef into main Jan 17, 2023
@hannako hannako deleted the content_schema_test branch January 17, 2023 11:34
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.

3 participants