rls_rails icon indicating copy to clipboard operation
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

Open ericgross opened this issue 1 year ago • 1 comments

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?

ericgross avatar May 19 '23 16:05 ericgross

Hi, yes, please feel free to open a PR, much appreciated :-)

sbiastoch avatar Jul 04 '23 12:07 sbiastoch