@@ -11,8 +11,8 @@ import org.specs2.mutable.Specification
1111
1212import com .zengularity .querymonad .core .module .sql .{
1313 SqlQuery ,
14- SqlQueryT ,
1514 SqlQueryRunner ,
15+ SqlQueryT ,
1616 WithSqlConnection
1717}
1818import com .zengularity .querymonad .test .core .module .sql .models .{
@@ -51,7 +51,8 @@ class SqlQueryRunnerSpec(implicit ee: ExecutionEnv) extends Specification {
5151 val result = runner(Professor .fetchProfessor(1 )).map(_.get)
5252
5353 result aka " professor" must beTypedEqualTo(
54- Professor (1 , " John Doe" , 35 , 1 )).await
54+ Professor (1 , " John Doe" , 35 , 1 )
55+ ).await
5556 }
5657
5758 " retrieve material with id 1" in {
@@ -61,15 +62,16 @@ class SqlQueryRunnerSpec(implicit ee: ExecutionEnv) extends Specification {
6162 val result = runner(Material .fetchMaterial(1 )).map(_.get)
6263
6364 result aka " material" must beTypedEqualTo(
64- Material (1 , " Computer Science" , 20 , " Beginner" )).await
65+ Material (1 , " Computer Science" , 20 , " Beginner" )
66+ ).await
6567 }
6668
6769 " not retrieve professor with id 2" in {
6870 val withSqlConnection : WithSqlConnection =
6971 SqlConnectionFactory .withSqlConnection(AcolyteQueryResult .Nil )
7072 val runner = SqlQueryRunner (withSqlConnection)
7173 val query = for {
72- _ <- SqlQuery .ask
74+ _ <- SqlQuery .ask
7375 professor <- Professor .fetchProfessor(2 )
7476 } yield professor
7577
@@ -93,12 +95,13 @@ class SqlQueryRunnerSpec(implicit ee: ExecutionEnv) extends Specification {
9395 val runner = SqlQueryRunner (withSqlConnection)
9496 val query = for {
9597 professor <- Professor .fetchProfessor(1 ).map(_.get)
96- material <- Material .fetchMaterial(professor.material).map(_.get)
98+ material <- Material .fetchMaterial(professor.material).map(_.get)
9799 } yield (professor, material)
98100
99101 runner(query) aka " professor and material" must beTypedEqualTo(
100102 Tuple2 (Professor (1 , " John Doe" , 35 , 1 ),
101- Material (1 , " Computer Science" , 20 , " Beginner" ))).await
103+ Material (1 , " Computer Science" , 20 , " Beginner" ))
104+ ).await
102105 }
103106
104107 " not retrieve professor with id 1 and no material" in {
@@ -115,7 +118,8 @@ class SqlQueryRunnerSpec(implicit ee: ExecutionEnv) extends Specification {
115118 val query = for {
116119 professor <- SqlQueryT .fromQuery(Professor .fetchProfessor(1 ))
117120 material <- SqlQueryT .fromQuery(
118- Material .fetchMaterial(professor.material))
121+ Material .fetchMaterial(professor.material)
122+ )
119123 } yield (professor, material)
120124
121125 runner(query) aka " professor and material" must beNone.await
0 commit comments