Add test from #100.
This commit is contained in:
parent
9436fe9649
commit
9b8f8eacbd
14
test/Test.hs
14
test/Test.hs
@ -65,6 +65,10 @@ share [mkPersist sqlSettings, mkMigrate "migrateAll"] [persistUpperCase|
|
|||||||
follower PersonId
|
follower PersonId
|
||||||
followed PersonId
|
followed PersonId
|
||||||
deriving Eq Show
|
deriving Eq Show
|
||||||
|
|
||||||
|
CcList
|
||||||
|
names [String]
|
||||||
|
|
||||||
Frontcover
|
Frontcover
|
||||||
number Int
|
number Int
|
||||||
title String
|
title String
|
||||||
@ -1095,6 +1099,16 @@ main = do
|
|||||||
return p
|
return p
|
||||||
liftIO $ ret `shouldBe` [ Entity p2k p2 ]
|
liftIO $ ret `shouldBe` [ Entity p2k p2 ]
|
||||||
|
|
||||||
|
|
||||||
|
describe "list fields" $ do
|
||||||
|
-- <https://github.com/prowdsponsor/esqueleto/issues/100>
|
||||||
|
it "can update list fields" $
|
||||||
|
run $ do
|
||||||
|
cclist <- insert $ CcList []
|
||||||
|
update $ \p -> do
|
||||||
|
set p [ CcListNames =. val ["fred"]]
|
||||||
|
where_ (p ^. CcListId ==. val cclist)
|
||||||
|
|
||||||
describe "inserts by select" $ do
|
describe "inserts by select" $ do
|
||||||
it "IN works for insertSelect" $
|
it "IN works for insertSelect" $
|
||||||
run $ do
|
run $ do
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user