Pop's documentation is quite lacking so here's a summary how I got unit tests working with copyist so we don't need a running PostgreSQL database in our CI and normally our tests are a lot faster.
Links:
- https://github.com/cockroachdb/copyist (tested with v1.4.1)
- https://github.com/gobuffalo/pop (tested with v6.0.3)
- Previous (somewhat simpler) version of this gist where everything has to be in the same test file: https://gist.github.com/spezifisch/7d59cef723741b916f2b06f6007c44e2
- Running example: https://github.com/spezifisch/rueder/tree/28a4cc14f39b9d9cd789935c26aab773911ed891