From 603e08346f1f247a91ef129b0ee8b15b58f4402b Mon Sep 17 00:00:00 2001 From: Cameron Samak Date: Thu, 17 Oct 2024 14:48:43 -0700 Subject: [PATCH] Fix some shouldSatisfy predicates that were always True (#404) * Add dependencies to nix packages in stack.yaml * Fix some shouldSatisfy predicates that were always True --- test/Common/Record.hs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/Common/Record.hs b/test/Common/Record.hs index cac586793..cf92b5690 100644 --- a/test/Common/Record.hs +++ b/test/Common/Record.hs @@ -271,7 +271,7 @@ testDeriveEsqueletoRecord = describe "deriveEsqueletoRecord" $ do , myAddress = (Just (Entity addr2 Address {addressAddress = "30-50 Feral Hogs Rd"})) } )) -> True - _ -> True) + _ -> False) itDb "can can handle joins on records with Nothing" $ do setup @@ -291,7 +291,7 @@ testDeriveEsqueletoRecord = describe "deriveEsqueletoRecord" $ do , myAddress = (Just (Entity addr2 Address {addressAddress = "30-50 Feral Hogs Rd"})) } )) -> True - _ -> True) + _ -> False) itDb "can left join on nested records" $ do setup @@ -312,7 +312,7 @@ testDeriveEsqueletoRecord = describe "deriveEsqueletoRecord" $ do , myAddress = (Just (Entity addr2 Address {addressAddress = "30-50 Feral Hogs Rd"})) } })) -> True - _ -> True) + _ -> False) itDb "can handle multiple left joins on the same record" $ do setup @@ -331,7 +331,7 @@ testDeriveEsqueletoRecord = describe "deriveEsqueletoRecord" $ do , myAddress = (Just (Entity addr2 Address {addressAddress = "30-50 Feral Hogs Rd"})) } })) -> True - _ -> True) + _ -> False) liftIO $ sortedRecords !! 1 `shouldSatisfy` (\case (_ :& _ :& Just (MyNestedRecord {myRecord = MyRecord {myName = "Rebecca", myAddress = Nothing}})) -> True