Skip to content

Instantly share code, notes, and snippets.

@yasuabe
Created March 26, 2019 22:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yasuabe/e3f176f4329fee46d43984e5a2c84915 to your computer and use it in GitHub Desktop.
Save yasuabe/e3f176f4329fee46d43984e5a2c84915 to your computer and use it in GitHub Desktop.
simple spec test for Doobie
package withhttp4s
import cats.effect.{ContextShift, IO}
import doobie.specs2.IOChecker
import org.specs2.mutable.Specification
object MyServiceSpec extends Specification with IOChecker {
import scala.concurrent.ExecutionContext.Implicits.global
implicit val cs: ContextShift[IO] = IO.contextShift(global)
val sut = new MyService[IO]
def transactor: doobie.Transactor[IO] = sut.xa
check(sut.findCitiesByCountry("DUMMY"))
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment