handleCTypeH success test
This commit is contained in:
parent
5470297bdc
commit
b02b67b4b7
1 changed files with 6 additions and 0 deletions
|
@ -125,6 +125,12 @@ spec = describe "Servant.API.ContentTypes" $ do
|
|||
"𝕺𝖋 𝖘𝖍𝖔𝖊𝖘--𝖆𝖓𝖉 𝖘𝖍𝖎𝖕𝖘--𝖆𝖓𝖉 𝖘𝖊𝖆𝖑𝖎𝖓𝖌-𝖜𝖆𝖝-- "
|
||||
`shouldSatisfy` isJustLeft
|
||||
|
||||
it "returns Just (Right val) if the decoding succeeds" $ do
|
||||
let val = SomeData "Of cabbages--and kings" 12
|
||||
handleCTypeH (Proxy :: Proxy '[JSON]) "application/json"
|
||||
(encode val)
|
||||
`shouldBe` Just (Right val)
|
||||
|
||||
|
||||
data SomeData = SomeData { record1 :: String, record2 :: Int }
|
||||
deriving (Generic, Eq, Show)
|
||||
|
|
Loading…
Reference in a new issue