assertDocs :: (FromJSON a, Show a, Eq a) => [(DocId, a)] -> BH IO ()
assertDocs as = do
  let (ids, docs) = unzip as
  res <- ids &   traverse (getDocument testIndex)
             <&> traverse (fmap getSource . eitherDecode . responseBody)

  liftIO $ res `shouldBe` Right (Just <$> docs)
assertDocs :: (FromJSON a, Show a, Eq a) => [(DocId, a)] -> BH IO ()
assertDocs as = do
  let (ids, docs) = unzip as
  res <- ids &   traverse (getDocument testIndex)
             <&> traverse (fmap getSource . eitherDecode . responseBody)

  liftIO $ res `shouldBe` Right (Just <$> docs)
assertDocs as = do
  let (ids, docs) = unzip as
  res <- ids &   traverse (getDocument testIndex)
             <&> traverse (fmap getSource . eitherDecode . responseBody)

  liftIO $ res `shouldBe` Right (Just <$> docs)