Package

doobie

scalatest

Permalink

package scalatest

Visibility
  1. Public
  2. All

Type Members

  1. trait QueryChecker extends AnyRef

    Permalink

    Mix-in trait for specifications that enables checking of doobie Query and Update values.

    Mix-in trait for specifications that enables checking of doobie Query and Update values.

    // An example specification, taken from the examples project.
    class ExampleSpec extends FunSuite with QueryChecker {
    
      // The transactor to use for the tests.
      val transactor = DriverManagerTransactor[IOLite](
        "org.postgresql.Driver",
        "jdbc:postgresql:world",
        "postgres", ""
      )
    
      // Now just mention the queries. Arguments are not used.
      check(MyDaoModule.findByNameAndAge(null, 0))
      check(MyDaoModule.allWoozles)
    
    }

Ungrouped