cerebris / jsonapi-resources

A resource-focused Rails library for developing JSON:API compliant servers.
http://jsonapi-resources.com
MIT License
2.32k stars 533 forks source link

Fix some testing issues including flappy tests, simplify quoting generated SQL strings #1363

Closed lgebhardt closed 3 years ago

lgebhardt commented 3 years ago

The source for the flappy tests turned out to be a missing default sort for requests through the relationship routes. This fixes that.

Removes tests that rely on comparing generated sql strings. The generated sql from the latest rails versions has changed due to new aliasing in the latest rails versions. This was making maintaining the tests very cumbersome.

Adds quotes around fields in the generated SQL fragments. Adds helper methods to create the sql for aliased fields.

Fixes #1358

All Submissions:

New Feature Submissions:

Bug fixes and Changes to Core Features:

Test Plan:

Reviewer Checklist: