on master help sign in
Fix tests
ef272c4Ollie Charles
tests/Main.hs+6−6
@@ -187,7 +187,7 @@ testSelectTestTable = databasePropertyTest "Can SELECT TestTable" \transaction -
187 liftIO $ Rel8.insert connection
187 liftIO $ Rel8.insert connection
188 Rel8.Insert
188 Rel8.Insert
189 { into = testTableSchema
189 { into = testTableSchema
190− , rows = map (Rel8.toInsert . Rel8.lit) rows
190+ , rows = map Rel8.lit rows
191 , onConflict = Rel8.DoNothing
191 , onConflict = Rel8.DoNothing
192 , returning = Rel8.NumberOfRowsAffected
192 , returning = Rel8.NumberOfRowsAffected
193 }
193 }
@@ -539,7 +539,7 @@ data TwoTestTables f =
539 { testTable1 :: TestTable f
539 { testTable1 :: TestTable f
540 , testTable2 :: TestTable f
540 , testTable2 :: TestTable f
541 }
541 }
542− deriving stock Generic
542+ deriving stock Generic
543 deriving anyclass Rel8.Rel8able
543 deriving anyclass Rel8.Rel8able
544
544
545
545
@@ -586,8 +586,8 @@ rollingBack
586 :: (MonadBaseControl IO m, MonadIO m)
586 :: (MonadBaseControl IO m, MonadIO m)
587 => Connection -> m a -> m a
587 => Connection -> m a -> m a
588rollingBack connection =
588rollingBack connection =
589− bracket_
589+ bracket_
590− (liftIO (run (sql "BEGIN") connection))
590+ (liftIO (run (sql "BEGIN") connection))
591 (liftIO (run (sql "ROLLBACK") connection))
591 (liftIO (run (sql "ROLLBACK") connection))
592
592
593
593
@@ -606,7 +606,7 @@ testUpdate = databasePropertyTest "Can UPDATE TestTable" \transaction -> do
606 void $ liftIO $ Rel8.insert connection
606 void $ liftIO $ Rel8.insert connection
607 Rel8.Insert
607 Rel8.Insert
608 { into = testTableSchema
608 { into = testTableSchema
609− , rows = map (Rel8.toInsert . Rel8.lit) $ Map.keys rows
609+ , rows = map Rel8.lit $ Map.keys rows
610 , onConflict = Rel8.DoNothing
610 , onConflict = Rel8.DoNothing
611 , returning = Rel8.NumberOfRowsAffected
611 , returning = Rel8.NumberOfRowsAffected
612 }
612 }
@@ -650,7 +650,7 @@ testDelete = databasePropertyTest "Can DELETE TestTable" \transaction -> do
650 void $ liftIO $ Rel8.insert connection
650 void $ liftIO $ Rel8.insert connection
651 Rel8.Insert
651 Rel8.Insert
652 { into = testTableSchema
652 { into = testTableSchema
653− , rows = map (Rel8.toInsert . Rel8.lit) rows
653+ , rows = map Rel8.lit rows
654 , onConflict = Rel8.DoNothing
654 , onConflict = Rel8.DoNothing
655 , returning = Rel8.NumberOfRowsAffected
655 , returning = Rel8.NumberOfRowsAffected
656 }
656 }