Skip to content

Latest commit

 

History

History
27 lines (18 loc) · 1.6 KB

README.md

File metadata and controls

27 lines (18 loc) · 1.6 KB

Filterameter Tests

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.

Test Application Data Model

The data model is primarily projects, activities, and tasks, with a few supporting models to enable association and multi-level association tests.

Data Model

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.)

Request Specs

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.