diff --git a/esqueleto.cabal b/esqueleto.cabal index d29cb58..5fdb160 100644 --- a/esqueleto.cabal +++ b/esqueleto.cabal @@ -97,7 +97,7 @@ test-suite test , HUnit , QuickCheck , hspec >= 1.8 - , persistent-sqlite >= 2.1 + , persistent-sqlite >= 2.1.3 , persistent-template >= 2.1 , monad-control , monad-logger >= 0.3 diff --git a/test/Test.hs b/test/Test.hs index cb7189b..31ad120 100644 --- a/test/Test.hs +++ b/test/Test.hs @@ -38,12 +38,9 @@ import Database.Persist.MySQL ( withMySQLConn , connectUser , connectPassword , defaultConnectInfo) -#else +#endif 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 @@ -918,12 +915,8 @@ main = do it "throws an exception on SQLite with <2 arguments" $ 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 + return (coalesce [p ^. PersonAge]) :: SqlQuery (SqlExpr (Value (Maybe Int)))) + `shouldThrow` (\(_ :: SqliteException) -> True) #endif describe "text functions" $ do