From 69a4ec0c4466acea43f5e7a742231990a66232ae Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Sun, 29 Mar 2015 08:29:49 +0300 Subject: [PATCH] Fix test suite for new SqliteException Sorry for the breakage @meteficha, and hope you don't mind that I'm deploying this to Hackage. --- esqueleto.cabal | 2 +- test/Test.hs | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/esqueleto.cabal b/esqueleto.cabal index 307c486..af54e38 100644 --- a/esqueleto.cabal +++ b/esqueleto.cabal @@ -1,5 +1,5 @@ name: esqueleto -version: 2.1.2.1 +version: 2.1.2.2 synopsis: Type-safe EDSL for SQL queries on persistent backends. homepage: https://github.com/prowdsponsor/esqueleto license: BSD3 diff --git a/test/Test.hs b/test/Test.hs index ce9cecf..92cf95e 100644 --- a/test/Test.hs +++ b/test/Test.hs @@ -34,6 +34,9 @@ import Database.Persist.MySQL ( withMySQLConn , defaultConnectInfo) #else import Database.Persist.Sqlite (withSqliteConn) +#if MIN_VERSION_persistent_sqlite(2,1,3) +import Database.Sqlite (SqliteException) +#endif #endif import Database.Persist.TH import Test.Hspec @@ -604,7 +607,11 @@ main = do run (select $ from $ \p -> do return (coalesce [p ^. PersonAge]) :: SqlQuery (SqlExpr (Value (Maybe Int))) +#if MIN_VERSION_persistent_sqlite(2,1,3) + ) `shouldThrow` (\(_ :: SqliteException) -> True) +#else ) `shouldThrow` (\(_ :: IOException) -> True) +#endif #endif describe "text functions" $