File tree Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -67,6 +67,7 @@ test-suite spec
67
67
other-modules : Servant.ForeignSpec
68
68
build-depends : base
69
69
, hspec >= 2.1.8
70
+ , servant
70
71
, servant-foreign
71
72
default-language : Haskell2010
72
73
default-extensions : ConstraintKinds
Original file line number Diff line number Diff line change @@ -6,9 +6,11 @@ module Servant.ForeignSpec where
6
6
import Data.Monoid ((<>) )
7
7
import Data.Proxy
8
8
import Servant.Foreign
9
+ import Servant.API.Internal.Test.ComprehensiveAPI
9
10
10
11
import Test.Hspec
11
12
13
+
12
14
spec :: Spec
13
15
spec = describe " Servant.Foreign" $ do
14
16
camelCaseSpec
@@ -22,6 +24,10 @@ camelCaseSpec = describe "camelCase" $ do
22
24
camelCase (FunctionName [" get" , " hyphen-ated" , " counter" ])
23
25
`shouldBe` " getHyphen-atedCounter"
24
26
27
+ ----------------------------------------------------------------------
28
+
29
+ -- This declaration simply checks that all instances are in place.
30
+ _ = listFromAPI (Proxy :: Proxy LangX ) (Proxy :: Proxy String ) comprehensiveAPIWithoutRaw
25
31
26
32
----------------------------------------------------------------------
27
33
@@ -30,6 +36,9 @@ data LangX
30
36
instance HasForeignType LangX String NoContent where
31
37
typeFor _ _ _ = " voidX"
32
38
39
+ instance HasForeignType LangX String (Headers ctyps NoContent ) where
40
+ typeFor _ _ _ = " voidX"
41
+
33
42
instance HasForeignType LangX String Int where
34
43
typeFor _ _ _ = " intX"
35
44
You can’t perform that action at this time.
0 commit comments