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

PoC for SQL snippet library, tests #12065

Merged
merged 4 commits into from
Sep 12, 2019
Merged

PoC for SQL snippet library, tests #12065

merged 4 commits into from
Sep 12, 2019

Conversation

pkarman
Copy link
Contributor

@pkarman pkarman commented Sep 11, 2019

connects #12044

Description

Basic proof of concept for SQL snippet library.

Adds a spec helper expect_sql that returns the results of a SQL query as an array of hashes, suitable for comparing to ActiveRecord objects.

Also adds a as_hash method to all our ActiveRecord models to make such comparisons possible.

@pkarman pkarman self-assigned this Sep 11, 2019
@pkarman pkarman requested review from kevmo and lomky September 11, 2019 22:26
@va-bot
Copy link
Collaborator

va-bot commented Sep 11, 2019

1 Warning
⚠️ This PR adds one or more new specs. If the specs use the DB, see if you can rewrite them so they don’t use the DB, such as by using build_stubbed. If they must use the DB, please remember to add the appropriate require statements and either the :postgres or :all_dbs tags, as documented in our Wiki: https://github.com/department-of-veterans-affairs/caseflow/wiki/Testing-Best-Practices#tests-that-write-to-the-db

Generated by 🚫 Danger

@codeclimate
Copy link

codeclimate bot commented Sep 11, 2019

Code Climate has analyzed commit 4cd375b and detected 0 issues on this pull request.

View more on Code Climate.

Copy link
Contributor

@lomky lomky left a comment

Choose a reason for hiding this comment

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

Couple thoughts for you to double-check, otherwise looks good!

@pkarman pkarman added the Ready-to-Merge This PR is ready to be merged and will be picked up by va-bot to automatically merge to master label Sep 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Ready-to-Merge This PR is ready to be merged and will be picked up by va-bot to automatically merge to master
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants