Skip to content

Commit

Permalink
Add notes about configuration test coverage
Browse files Browse the repository at this point in the history
To help with refactoring of the tests, `docs/associations.md` contains a table
showing which configuration options are covered in the spec files for each of
the association types:

* `has_one`
* `has_many`
* `has_and_belongs_to_many`
  • Loading branch information
jrmhaig committed Aug 15, 2021
1 parent 87edfd3 commit 1b32995
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions docs/associations.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
## State of testing

This table shows the test coverage of different configuration options with
relation to each association type together with some notes about behaviour.
Associated instances in a duplicated instance may be blank, copied from the
original instance or duplicated as new instances.

| | `has_one` | `has_many` | `has_and_belongs_to_many` |
|---|---|---|---|
| not enabled | Yes (association is nil) | No | Yes (associations are empty) |
| enabled | Yes (association is duplicated) | Yes (associations are duplicated) | Yes (associations are copied) |
| blank assocation | Yes (assocation is nil | No | No |
| nullify | Yes (association is nil | No | No |
| preprocessing | Yes | Yes | No |
| not recognized | Yes (association is nil) | Yes | Yes (associations are empty) |
| with `clone` | N/A | N/A | Yes (associations are duplicated) |
| STI | | | |
| propagate | Yes | No | No |
| no propagate | Yes | No | No |
| set on STI table | Yes | No | No |
| `through` | | | |
| enabled on join table | Yes (association is duplicated) | Yes (associations are copied) | No |
| not enabled on join | Yes (association is nil) | Yes (associations are blank) | No |
| not recognized on join | Yes (association is nil) | Yes (associations are blank) | No |
| with `clone` | N/A | Yes (associations are duplicated) | No |

0 comments on commit 1b32995

Please sign in to comment.