The tests are written in RSpec and include both unit tests for the filterameter classes as well as a dummy application with models and controllers that support request specs.
The data model is primarily projects, activities, and tasks, with a few supporting models to enable association and multi-level association tests.
In order to support testing across Rails versions, the schema was manually edited to remove the Rails version in the ActiveRecord::Schema.define
statement. If additional updates are made to the schema, this manual step will need to be repeated. (Versions prior to 7.1 do not add the stamp.)
The request specs are broken up into the following groups:
- attribute filters
- attribute sorts
- scope filters
- partial filters
- range filters
- nested filters
- multi-level nested filters
- controller overrides
- default sorts
The controllers use JSON repsonses because it is easier to check JSON responses than HTML responses.