add a test case for #97

This commit is contained in:
Philipp Balzarek 2015-04-21 20:04:18 +02:00
parent b0b40a07ff
commit 451beb9a55

View File

@ -439,6 +439,19 @@ main = do
retArt `shouldBe` article
retTag `shouldBe` tag
it "respects the associativity of joins" $
run $ do
insert' p1
ps <- select . from $
\((p :: SqlExpr (Entity Person))
`LeftOuterJoin`
(( q :: SqlExpr (Entity Person))
`InnerJoin` (r :: SqlExpr (Entity Person)))) -> do
on (val False) -- Inner join is empty
on (val True)
return p
liftIO $ (entityVal <$> ps) `shouldBe` [p1]
describe "select/where_" $ do
it "works for a simple example with (==.)" $
run $ do