From 4b7ffc94618aeac47b5469f9d8bab0495179b8c7 Mon Sep 17 00:00:00 2001 From: David Turner Date: Tue, 16 May 2017 10:29:27 +0000 Subject: [PATCH] Add test that EmptyAPI does not generate any docs --- servant-docs/test/Servant/DocsSpec.hs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/servant-docs/test/Servant/DocsSpec.hs b/servant-docs/test/Servant/DocsSpec.hs index 054ea00a..3daffbcf 100644 --- a/servant-docs/test/Servant/DocsSpec.hs +++ b/servant-docs/test/Servant/DocsSpec.hs @@ -104,6 +104,9 @@ spec = describe "Servant.Docs" $ do it "contains request body samples" $ md `shouldContain` "17" + it "does not generate any docs mentioning the 'empty-api' path" $ + md `shouldNotContain` "empty-api" + -- * APIs @@ -128,6 +131,7 @@ instance MimeRender PlainText Int where type TestApi1 = Get '[JSON, PlainText] (Headers '[Header "Location" String] Int) :<|> ReqBody '[JSON] String :> Post '[JSON] Datatype1 :<|> Header "X-Test" Int :> Put '[JSON] Int + :<|> "empty-api" :> EmptyAPI data TT = TT1 | TT2 deriving (Show, Eq) data UT = UT1 | UT2 deriving (Show, Eq)