Skip to content
This repository has been archived by the owner on Jan 23, 2024. It is now read-only.

Fi 540 check resource id from read test #416

Merged
4 commits merged into from
Jan 28, 2020

Conversation

ghost
Copy link

@ghost ghost commented Jan 14, 2020

This PR makes it so that validate_read_reply will check if the resource returned has the same id as the resource used for the read test. I don't test the case when the resource is a reference because I didn't know a way to get the id for any reference and I don't think that situation is used in any of our existing sequences.

Submitter:

  • This pull request describes why these changes were made
  • Internal ticket for this PR: https://oncprojectracking.healthit.gov/support/browse/FI-540
  • Internal ticket links to this PR
  • Internal ticket is properly labeled (Community/Program)
  • Internal ticket has a justification for its Community/Program label
  • Code diff has been reviewed for extraneous/missing code
  • Tests are included and test edge cases
  • Tests/code quality metrics have been run locally and pass

Reviewer 1:

Name:

  • Code is maintainable and reusable, reuses existing code and infrastructure
    where appropriate, and accomplishes the task's purpose
  • The tests appropriately test the new code, including edge cases
  • You have tried to break the code

Reviewer 2:

Name:

  • Code is maintainable and reusable, reuses existing code and infrastructure
    where appropriate, and accomplishes the task's purpose
  • The tests appropriately test the new code, including edge cases
  • You have tried to break the code

lib/app/sequence_base.rb Outdated Show resolved Hide resolved
lib/app/sequence_base.rb Outdated Show resolved Hide resolved
@Jammjammjamm
Copy link
Contributor

I'm not saying that you need to support getting ids from references, but if you want to, the id is whatever comes after the last / in the reference. If we don't ever use references here, though, it would be nice to get rid of that code altogether.

@ghost
Copy link
Author

ghost commented Jan 21, 2020

I'm not saying that you need to support getting ids from references, but if you want to, the id is whatever comes after the last / in the reference. If we don't ever use references here, though, it would be nice to get rid of that code altogether.

I just removed the reference part.

@ghost ghost force-pushed the fi-540-check-resource-id-from-read-test branch from 92eefdc to 8ca9943 Compare January 24, 2020 21:14
@ghost
Copy link
Author

ghost commented Jan 28, 2020

I added the reference check back in because it's being used in one test in the Argonaut MedicationOrder sequence.

@ghost ghost force-pushed the fi-540-check-resource-id-from-read-test branch from d0e130e to cb954fb Compare January 28, 2020 17:08
@ghost ghost merged commit 8b257d0 into development Jan 28, 2020
@ghost ghost deleted the fi-540-check-resource-id-from-read-test branch January 28, 2020 21:22
@radamson radamson mentioned this pull request Aug 9, 2020
This pull request was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants