rls_rails
rls_rails copied to clipboard
`rspec` tests fail because policies are not applied to the test database unless the `structure.sql` file is being used
I have found that it is required to add the line:
config.active_record.schema_format = :sql
to the config/application.rb
file in order to be able to pass my rspec
tests because the test database was getting the schema.rb
file contents for testing which does not contain the policies that are required to enforce RLS.
Should I add a note to the readme and open a PR?
Hi, yes, please feel free to open a PR, much appreciated :-)