Minor fixes

This commit is contained in:
Tomasz Rybarczyk 2021-11-09 09:16:11 +01:00
parent ead60565fd
commit 3a1fa77691

View File

@ -68,7 +68,7 @@ test ∷
String String
AppM Unit AppM Unit
TestSuite TestSuite
test (Connection (Left pool)) name action = Test.Unit.test name $ checkPGErrors $ action test (Connection (Left _)) name action = Test.Unit.test name $ checkPGErrors $ action
test (Connection (Right client)) name action = Test.Unit.test name $ checkPGErrors $ withRollback client action test (Connection (Right client)) name action = Test.Unit.test name $ checkPGErrors $ withRollback client action
@ -478,7 +478,7 @@ main = do
testPool <- liftEffect $ Pool.new (noSuchDatabaseConfig config) testPool <- liftEffect $ Pool.new (noSuchDatabaseConfig config)
runExceptT (withClient testPool doNothing) runExceptT (withClient testPool doNothing)
>>= case _ of >>= case _ of
Left (ProgrammingError { code, message }) -> equal code "3D000" Left (ProgrammingError { code }) -> equal code "3D000"
_ -> Test.Unit.failure "PostgreSQL error was expected" _ -> Test.Unit.failure "PostgreSQL error was expected"
Test.Unit.test "get pool configuration from postgres uri" do Test.Unit.test "get pool configuration from postgres uri" do
equal (parseURI validUriToPoolConfigs.uri) (Just validUriToPoolConfigs.poolConfig) equal (parseURI validUriToPoolConfigs.uri) (Just validUriToPoolConfigs.poolConfig)