Corrections to make unit tests pass + add workflow to run unit tests#42
Merged
Conversation
ed594b2 to
f60e176
Compare
Guard against nil client in TestScriptEngine#initialize and BaseTest#version_namespace when calling fhir_version, which occurs when TestScriptEngine is instantiated without a client (e.g. list_all).
ignore_multiple_types is an Array, so concatenating a String raises TypeError: no implicit conversion of String into Array. Use an Array literal instead.
When an optional (min=0) CodeableConcept field has a required binding to an external ValueSet (e.g. LOINC, SNOMED) and no valid_codes are available in the model metadata, the generator produced a random code that always fails validation. Since these fields are optional (min=0), skip them to generate valid resources.
The spec example testscripts are intentionally not loaded in CI/production, so hardcoding 'TS-testscript-example' always fails. Use tests.keys.first to reference whatever testscript is actually loaded.
Runs bundle exec rake test_unit on every push to master and on every pull request, without requiring a FHIR server.
f60e176 to
1603ea2
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.