zio / zio-sql

Type-safe, composable SQL for ZIO applications
https://zio.dev/zio-sql/
Apache License 2.0
236 stars 116 forks source link

Clean up FunctionDefSpec #679

Open sviezypan opened 2 years ago

sviezypan commented 2 years ago

Lots of tests in ZIO SQL were written in past, when some operators were not yet available.

In many places we could simplify, for example:

     ....
      val expected = ???
      val assertion = for {
        r <- testResult.runCollect
      } yield assert(r.head)(equalTo(expected))

      assertion.mapErrorCause(cause => Cause.stackless(cause.untraced))

to

assertZIO(testResult.runHead.some)(equalTo(expected))

This is to be done in two modules:

sarahotoole commented 2 years ago

I'll take this one