Testing everything against PostgreSQL.
Anatomy of a test: example
Testing existence of
Testing what a table has got
- a primary key
- a column which is primary key
- specific column types
- specified columns
- specified not null columns
- specified null columns
- specified index
- a unique column
- a unique constraint
- indexed or not
Testing what a table has NOT got
Being precise on what should be intact in DB
- columns of a table
- extensions
- functions
- groups
- languages
- roles
- schemas
- tables
- types
- users
- views
- indexes
Knowing exceptions and successes
- a test that asserting an exception is being thrown
- a test that asserting there is no exception is being thrown
- a test that asserting the performance of a query
- a test that asserting the performance of a query in a range
Simple assertions