Add failing test
This commit is contained in:
parent
3db6361d2c
commit
9338cfdc5e
1
.gitignore
vendored
1
.gitignore
vendored
@ -5,3 +5,4 @@ stack.yaml.lock
|
||||
.cabal-sandbox/
|
||||
cabal.sandbox.config
|
||||
.hspec-failures
|
||||
stack.yaml.lock
|
||||
|
||||
@ -219,6 +219,22 @@ testSelect run = do
|
||||
ret <- select $ return nothing
|
||||
liftIO $ ret `shouldBe` [ Value (Nothing :: Maybe Int) ]
|
||||
|
||||
describe "sub_select" $ do
|
||||
it "works inside of sum" $ do
|
||||
run $ do
|
||||
ret <-
|
||||
select $
|
||||
pure $
|
||||
sum_ $
|
||||
sub_select $
|
||||
from $ \foo -> do
|
||||
pure (foo ^. FooName)
|
||||
nonSub <-
|
||||
select $
|
||||
from $ \foo -> do
|
||||
pure (sum_ (foo ^. FooName))
|
||||
|
||||
liftIO $ ret `shouldBe` (nonSub :: [Value (Maybe Int)])
|
||||
|
||||
testSelectSource :: Run -> Spec
|
||||
testSelectSource run = do
|
||||
|
||||
Loading…
Reference in New Issue
Block a user