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

Blazer Testing #613

Open
3 tasks
CraigJZ opened this issue Feb 19, 2021 · 2 comments
Open
3 tasks

Blazer Testing #613

CraigJZ opened this issue Feb 19, 2021 · 2 comments

Comments

@CraigJZ
Copy link
Collaborator

CraigJZ commented Feb 19, 2021

Description

We are using a modified implementation of the Blazer gem to provide direct SQL access to specific tables with data scoped to an organizational level. Additional information about this set up can be found here: blazer_reporting.md. A key part of this setup is the row level security policies restricting users to data belonging only to their organization. We are lacking test coverage of this feature. This issue would add specs to cover, at least, the following scenarios:

  • When a user runs a query it returns only data belonging to that users organization
  • When a user attempts to run a query against a table they don't have access to, an error is displayed and no data is returned.
  • A user only has access to their organization's data through the Blazer interface.
@adub65
Copy link
Contributor

adub65 commented Oct 14, 2021

@CraigJZ , would you need a system test, unit test, or both for this?

@CraigJZ
Copy link
Collaborator Author

CraigJZ commented Oct 14, 2021

@adub65 I was thinking system specs, mostly because I've been a bit stuck on how to set them up as unit tests. If you are able to capture the needed test cases in unit tests, that would be great though. The closest example I can point to is this controller spec for ensuring reports for other orgs are not visible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants