@@ -125,6 +125,12 @@ spec = describe "Servant.API.ContentTypes" $ do
125125 "πΊπ πππππ--πππ πππππ--πππ πππππππ-πππ-- "
126126 `shouldSatisfy` isJustLeft
127127
128+ it "returns Just (Right val) if the decoding succeeds" $ do
129+ let val = SomeData "Of cabbages--and kings" 12
130+ handleCTypeH (Proxy :: Proxy '[JSON]) "application/json"
131+ (encode val)
132+ `shouldBe` Just (Right val)
133+
128134
129135data SomeData = SomeData { record1 :: String, record2 :: Int }
130136 deriving (Generic, Eq, Show)