Added tests for nullsfirst / nullslast
This commit is contained in:
committed by
Joe Nelson
parent
97c9bfe93f
commit
01c67ab793
+13
-1
@@ -109,9 +109,21 @@ createItems n = do
|
||||
<- H.acquirePool pgSettings testPoolOpts
|
||||
void . liftIO $ H.session pool $ H.tx Nothing txn
|
||||
where
|
||||
txn = sequence_ $ map H.unitEx stmts
|
||||
txn = mapM_ H.unitEx stmts
|
||||
stmts = map [H.stmt|insert into "1".items (id) values (?)|] [1..n]
|
||||
|
||||
createNulls :: Int -> IO ()
|
||||
createNulls n = do
|
||||
pool :: H.Pool H.Postgres
|
||||
<- H.acquirePool pgSettings testPoolOpts
|
||||
void . liftIO $ H.session pool $ H.tx Nothing txn
|
||||
where
|
||||
txn = mapM_ H.unitEx (stmt':stmts)
|
||||
stmt' = [H.stmt|insert into "1".no_pk (a,b) values (null,null)|]
|
||||
stmts = map [H.stmt|insert into "1".no_pk (a,b) values (?,0)|] [1..n]
|
||||
|
||||
|
||||
|
||||
-- for hspec-wai
|
||||
pending_ :: WaiSession ()
|
||||
pending_ = liftIO Test.Hspec.pending
|
||||
|
||||
Reference in New Issue
Block a user