From 15121a7d27a2918862ccd81004fd5db82b42cf00 Mon Sep 17 00:00:00 2001 From: Felipe Lessa Date: Tue, 4 Sep 2012 01:10:01 -0300 Subject: [PATCH] One more test. --- test/Test.hs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/test/Test.hs b/test/Test.hs index 306c5a9..d4d458c 100644 --- a/test/Test.hs +++ b/test/Test.hs @@ -106,6 +106,16 @@ main = do where_ (p ^. PersonName ==. val "John") return p liftIO $ ret `shouldBe` [ Entity p1k p1 ] + it "works for a simple example with (==.) and (||.)" $ + run $ do + p1k <- insert p1 + p2k <- insert p2 + _ <- insert p3 + ret <- select $ + from $ \p -> do + where_ (p ^. PersonName ==. val "John" ||. p ^. PersonName ==. val "Rachel") + return p + liftIO $ ret `shouldBe` [ Entity p1k p1, Entity p2k p2 ] it "works for a simple example with (>.)" $ run $ do p1k <- insert p1