@@ -115,21 +115,21 @@ spec = describe "Servant.API.ContentTypes" $ do
116 it "returns the Content-Type as the first element of the tuple" $ do
116 it "returns the Content-Type as the first element of the tuple" $ do
117 handleAcceptH (Proxy :: Proxy '[JSON]) "*/*" (3 :: Int)
117 handleAcceptH (Proxy :: Proxy '[JSON]) "*/*" (3 :: Int)
118− `shouldSatisfy` ((== "application/json") . fst . fromJust)
118+ `shouldSatisfy` ((== "application/json;charset=utf-8") . fst . fromJust)
119 handleAcceptH (Proxy :: Proxy '[PlainText, JSON]) "application/json" (3 :: Int)
119 handleAcceptH (Proxy :: Proxy '[PlainText, JSON]) "application/json" (3 :: Int)
120− `shouldSatisfy` ((== "application/json") . fst . fromJust)
120+ `shouldSatisfy` ((== "application/json;charset=utf-8") . fst . fromJust)
121 handleAcceptH (Proxy :: Proxy '[PlainText, JSON, OctetStream])
121 handleAcceptH (Proxy :: Proxy '[PlainText, JSON, OctetStream])
122 "application/octet-stream" ("content" :: ByteString)
122 "application/octet-stream" ("content" :: ByteString)
123 `shouldSatisfy` ((== "application/octet-stream") . fst . fromJust)
123 `shouldSatisfy` ((== "application/octet-stream") . fst . fromJust)
125 it "returns the appropriately serialized representation" $ do
125 it "returns the appropriately serialized representation" $ do
126 property $ \x -> handleAcceptH (Proxy :: Proxy '[JSON]) "*/*" (x :: SomeData)
126 property $ \x -> handleAcceptH (Proxy :: Proxy '[JSON]) "*/*" (x :: SomeData)
127− == Just ("application/json", encode x)
127+ == Just ("application/json;charset=utf-8", encode x)
129 it "respects the Accept spec ordering" $ do
129 it "respects the Accept spec ordering" $ do
130 let highest a b c = maximumBy (compare `on` snd)
130 let highest a b c = maximumBy (compare `on` snd)
131 [ ("application/octet-stream", a)
131 [ ("application/octet-stream", a)
132− , ("application/json", b)
132+ , ("application/json;charset=utf-8", b)
133 , ("text/plain;charset=utf-8", c)
133 , ("text/plain;charset=utf-8", c)
135 let acceptH a b c = addToAccept (Proxy :: Proxy OctetStream) a $
135 let acceptH a b c = addToAccept (Proxy :: Proxy OctetStream) a $