Safe Haskell | None |
---|---|
Language | Haskell2010 |
Write tests that require a Postgres connection.
Synopsis
- test :: HasCallStack => Text -> (Connection -> Expectation) -> Test
Documentation
test :: HasCallStack => Text -> (Connection -> Expectation) -> Test Source #
A variant of test
that is passed a Postgres connection, for doing tests
that require access to Postgres. The test body is run within a transaction that
gets rolled back after the test completes.
Usage:
Postgres.Test.test "My Postgres test" Postgres - do -- test stuff!