use persistent-sqlite >= 2.1.3
This commit is contained in:
parent
bfc8502dbf
commit
75c3549c86
@ -94,7 +94,7 @@ test-suite test
|
|||||||
, HUnit
|
, HUnit
|
||||||
, QuickCheck
|
, QuickCheck
|
||||||
, hspec >= 1.8
|
, hspec >= 1.8
|
||||||
, persistent-sqlite >= 2.1
|
, persistent-sqlite >= 2.1.3
|
||||||
, persistent-template >= 2.1
|
, persistent-template >= 2.1
|
||||||
, monad-control
|
, monad-control
|
||||||
, monad-logger >= 0.3
|
, monad-logger >= 0.3
|
||||||
|
|||||||
13
test/Test.hs
13
test/Test.hs
@ -40,12 +40,9 @@ import Database.Persist.MySQL ( withMySQLConn
|
|||||||
, connectUser
|
, connectUser
|
||||||
, connectPassword
|
, connectPassword
|
||||||
, defaultConnectInfo)
|
, defaultConnectInfo)
|
||||||
#else
|
#endif
|
||||||
import Database.Persist.Sqlite (withSqliteConn)
|
import Database.Persist.Sqlite (withSqliteConn)
|
||||||
#if MIN_VERSION_persistent_sqlite(2,1,3)
|
|
||||||
import Database.Sqlite (SqliteException)
|
import Database.Sqlite (SqliteException)
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
import Database.Persist.TH
|
import Database.Persist.TH
|
||||||
import Test.Hspec
|
import Test.Hspec
|
||||||
|
|
||||||
@ -921,12 +918,8 @@ main = do
|
|||||||
it "throws an exception on SQLite with <2 arguments" $
|
it "throws an exception on SQLite with <2 arguments" $
|
||||||
run (select $
|
run (select $
|
||||||
from $ \p -> do
|
from $ \p -> do
|
||||||
return (coalesce [p ^. PersonAge]) :: SqlQuery (SqlExpr (Value (Maybe Int)))
|
return (coalesce [p ^. PersonAge]) :: SqlQuery (SqlExpr (Value (Maybe Int))))
|
||||||
#if MIN_VERSION_persistent_sqlite(2,1,3)
|
`shouldThrow` (\(_ :: SqliteException) -> True)
|
||||||
) `shouldThrow` (\(_ :: SqliteException) -> True)
|
|
||||||
#else
|
|
||||||
) `shouldThrow` (\(_ :: IOException) -> True)
|
|
||||||
#endif
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
describe "text functions" $ do
|
describe "text functions" $ do
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user