diff --git a/Hash2Pub/test/FediChordSpec.hs b/Hash2Pub/test/FediChordSpec.hs index 40c2d2a..ebd730e 100644 --- a/Hash2Pub/test/FediChordSpec.hs +++ b/Hash2Pub/test/FediChordSpec.hs @@ -107,6 +107,11 @@ spec = do cacheWithProxyNodeEntry <- addCacheEntry maxNode 0 =<< newCache nid. cacheGetNodeStateUnvalidated <$> cacheLookupPred (exampleID - 2) cacheWithProxyNodeEntry `shouldBe` Just maxBound nid. cacheGetNodeStateUnvalidated <$> cacheLookupSucc (anotherID + 2) cacheWithProxyNodeEntry `shouldBe` Just maxBound + it "entries can be deleted" $ do + nC <- addCacheEntry maxNode 0 =<< newCache + let nc' = deleteCacheEntry maxBound . deleteCacheEntry anotherID $ nC + cacheLookup anotherID nc' `shouldBe` Nothing + cacheLookup maxBound nc' `shouldBe` Nothing describe "NodeCache query lookup" $ do