nested tuple with one element: Tuple a Unit; and test

This commit is contained in:
Kamirus
2018-11-16 13:46:19 +01:00
parent 2fa1c0551e
commit e9d9e4ea0f
2 changed files with 18 additions and 4 deletions

View File

@@ -27,7 +27,7 @@ import Foreign.Object (Object, fromFoldable)
import Math ((%))
import Partial.Unsafe (unsafePartial)
import Test.Assert (assert)
import Test.Example (run) as Example
-- import Test.Example (run) as Example
import Test.Unit (TestF, suite)
import Test.Unit as Test.Unit
import Test.Unit.Assert (equal)
@@ -66,7 +66,7 @@ main ∷ Effect Unit
main = do
void $ launchAff do
-- Running guide from README
Example.run
-- Example.run
-- Acctual test suite
pool <- newPool config
@@ -139,6 +139,15 @@ main = do
""") Row0
liftEffect <<< assert $ names == ["pork" /\ true, "rookworst" /\ true]
test conn "nested tuples as rows - just one element" $ do
let row = date 2010 2 31 /\ unit
execute conn (Query """
INSERT INTO dates (date)
VALUES ($1)
""") row
rows <- query conn (Query "SELECT date FROM dates") Row0
liftEffect <<< assert $ rows == [row]
let
insertFood =
execute conn (Query """