Open causztic opened 4 months ago
A good place to start would be to set up something in the spec/integration
directory following the general pattern there. I think making a new file such as spec/integration/composite_primary_key_spec.rb
may be a good approach.
The test should set up a model / DB table using with_model
and with a pg_search_scope
applied. It should perform some queries against the model and assert that the correct results are returned.
If we have this level of testing, then I think that the more specific "unit"-level specs are more optional and only really needed if there is some complex or surprising behavior in one of the specific implementation classes.
You can also run rake standard:fix
to fix the code formatting issues that are being triggered.
Good luck, and thanks for this contribution.
@nertzy before e1fd67d I attempted to test when both the model AND the association have composite primary keys, and quickly realised that we need some more changes on association.rb
to make it work
Could we leave that for a future PR?
@nertzy checking in ICYMI!
Fixes https://github.com/Casecommons/pg_search/issues/531