fix test
commit8d08fc11e5aaa1a3654f36ebca005d26d16d1499
authorEitan Chatav <eitan@Eitans-MacBook-Pro.local>
dateSat 13 Apr 2019, 22:30 (8 years ago)
parent014beee
squeal-postgresql/src/Squeal/PostgreSQL/PQ.hs+1−1
@@ -644,7 +644,7 @@ okResult_ result = liftIO $ do
644644
645645-- | Check if a `Result`'s status is either `LibPQ.CommandOk`
646646-- or `LibPQ.TuplesOk` otherwise `throw` a `PQException`.
647−okResult :: MonadIO io => K LibPQ.Result xs -> io ()
647+okResult :: MonadIO io => K LibPQ.Result row -> io ()
648648okResult = okResult_ . unK
649649
650650-- | Catch `SquealException`s.
squeal-postgresql/test/Specs/ExceptionHandling.hs+1−1
@@ -114,7 +114,7 @@ specs = before_ setupDB $ after_ dropDB $
114114 describe "Exceptions" $ do
115115
116116 let
117− dupKeyErr = PQException FatalError (Just "23505")
117+ dupKeyErr = PQException $ PQState FatalError (Just "23505")
118118 (Just "ERROR: duplicate key value violates unique constraint \"unique_names\"\nDETAIL: Key (name)=(TestUser) already exists.\n")
119119
120120 it "should be thrown for unique constraint violation in a manipulation" $