@@ -3,11 +3,13 @@
3{-# LANGUAGE TypeOperators #-}
3{-# LANGUAGE TypeOperators #-}
4module Servant.Utils.LinksSpec where
4module Servant.Utils.LinksSpec where
6−import Test.Hspec
6+import Test.Hspec ( Spec, it, describe )
8import Servant.API
8import Servant.API
9+ ( type (:<|>), ReqBody, QueryParam, Get, Post, Capture, type (:>) )
9import Servant.QQSpec ( (~>) )
10import Servant.QQSpec ( (~>) )
10−import Servant.Utils.Links (IsElem, IsLink)
11+import Servant.Utils.Links ( IsElem, IsLink )
12type TestApi =
14type TestApi =
13 "hello" :> Capture "name" String :> QueryParam "capital" Bool :> Get Bool
15 "hello" :> Capture "name" String :> QueryParam "capital" Bool :> Get Bool
@@ -49,4 +51,3 @@ isLink = describe "IsLink" $ do
49 it "is False of anything with captures" $ do
51 it "is False of anything with captures" $ do
50 reflected (Proxy::Proxy (IsLink NotALink)) ~> False
52 reflected (Proxy::Proxy (IsLink NotALink)) ~> False
51 reflected (Proxy::Proxy (IsLink NotALink2)) ~> False
53 reflected (Proxy::Proxy (IsLink NotALink2)) ~> False