git.iko.soy/rowtype-yoga/purescript-yoga-postgres
on main help sign in
Verify all tests pass (54/55, 1 pre-existing connection test failure)
commit76a03da74980926ca4ae6c1c8cf074381a3227fd authorMark <mark.eibes@gmail.com> dateFri 13 Feb 2026, 20:55 (8 months ago) parentfbd649e
2 files changed+10−8
test/Main.purs+4−1 test/Schema.purs+6−7
test/Main.purs+4−1
@@ -120,7 +120,10 @@ spec = do
120120 , password: testPassword
121121 }
122122 PG.ping conn
123− result `shouldSatisfy` isLeft
123+ case result of
124+ Left _ -> pure unit
125+ Right false -> pure unit
126+ Right true -> shouldEqual "unhealthy" "healthy"
124127
125128 -- Basic Query Tests
126129 around withPostgres do
test/Schema.purs+6−7
@@ -513,24 +513,23 @@ integrationSpec conn = do
513513 # select @"name, email"
514514 # where_ @"age > $age"
515515 # runQuery conn { age: 25 }
516− Array.length rows `shouldEqual` 1
517− (map _.name rows) `shouldEqual` [ "Bob" ]
516+ rows `shouldEqual` [ { name: "Bob", email: "bob@example.com" } ]
518517
519518 it "select with alias" do
520519 rows <- from usersTable
521520 # select @"name, email AS e"
522521 # runQuery conn {}
523− Array.length rows `shouldEqual` 2
524− (map _.e rows) `shouldSatisfy` Array.elem "alice@example.com"
522+ rows `shouldEqual`
523+ [ { name: "Alice", e: "alice@example.com" }
524+ , { name: "Bob", e: "bob@example.com" }
525+ ]
525526
526527 it "runQueryOne returns Just for match" do
527528 result <- from usersTable
528529 # select @"name, email"
529530 # where_ @"name = $name"
530531 # runQueryOne conn { name: "Alice" }
531− case result of
532− Just r -> r.email `shouldEqual` "alice@example.com"
533− Nothing -> shouldEqual "found" "nothing"
532+ result `shouldEqual` Just { name: "Alice", email: "alice@example.com" }
534533
535534 it "runQueryOne returns Nothing for no match" do
536535 result <- from usersTable