Lower the chance of false negatives even more.

This commit is contained in:
Felipe Lessa 2014-04-13 23:55:13 -03:00
parent 0f9a044602
commit 80d3e7c9cd

View File

@ -798,14 +798,15 @@ main = do
describe "rand works" $ do
it "returns result in random order" $
run $ do
_ <- insert p1
_ <- insert p2
_ <- insert p3
_ <- insert p4
_ <- insert $ Person "Jane" Nothing
_ <- insert $ Person "Mark" Nothing
_ <- insert $ Person "Sarah" Nothing
_ <- insert $ Person "Paul" Nothing
replicateM_ 20 $ do
_ <- insert p1
_ <- insert p2
_ <- insert p3
_ <- insert p4
_ <- insert $ Person "Jane" Nothing
_ <- insert $ Person "Mark" Nothing
_ <- insert $ Person "Sarah" Nothing
insert $ Person "Paul" Nothing
ret1 <- fmap (map unValue) $ select $ from $ \p -> do
orderBy [rand]
return (p ^. PersonId)