1.6.10
This commit is contained in:
parent
28e5b606b2
commit
1d67e3a359
@ -1,6 +1,6 @@
|
||||
# ChangeLog for yesod-test
|
||||
|
||||
## 1.6.9.2
|
||||
## 1.6.10
|
||||
|
||||
* `statusIs` assertion failures now print a preview of the response body, if the response body is UTF-8 or ASCII. [#1680](https://github.com/yesodweb/yesod/pull/1680/files)
|
||||
* Adds an `Yesod.Test.Internal`, which exposes functions that yesod-test uses. These functions do _not_ constitute a stable API.
|
||||
|
||||
@ -23,7 +23,7 @@ import Data.Semigroup (Semigroup(..))
|
||||
-- | Helper function to get the first 1024 characters of the body, assuming it is UTF-8.
|
||||
-- This function is used to preview the body in case of an assertion failure.
|
||||
--
|
||||
-- @since 1.6.9.2
|
||||
-- @since 1.6.10
|
||||
getBodyTextPreview :: LBS.ByteString -> T.Text
|
||||
getBodyTextPreview body =
|
||||
let characterLimit = 1024
|
||||
@ -34,7 +34,7 @@ getBodyTextPreview body =
|
||||
|
||||
-- | Helper function to determine if we can print a body as plain text, for debugging purposes.
|
||||
--
|
||||
-- @since 1.6.9.2
|
||||
-- @since 1.6.10
|
||||
contentTypeHeaderIsUtf8 :: BS8.ByteString -> Bool
|
||||
contentTypeHeaderIsUtf8 contentTypeBS =
|
||||
-- Convert to Text, so we can use T.splitOn
|
||||
@ -50,7 +50,7 @@ contentTypeHeaderIsUtf8 contentTypeBS =
|
||||
|
||||
-- | List of Content-Types that are assumed to be UTF-8 (e.g. JSON).
|
||||
--
|
||||
-- @since 1.6.9.2
|
||||
-- @since 1.6.10
|
||||
assumedUTF8ContentTypes :: Set.Set BS8.ByteString
|
||||
assumedUTF8ContentTypes = Set.fromList $ map Content.simpleContentType
|
||||
[ Content.typeHtml
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
name: yesod-test
|
||||
version: 1.6.9.2
|
||||
version: 1.6.10
|
||||
license: MIT
|
||||
license-file: LICENSE
|
||||
author: Nubis <nubis@woobiz.com.ar>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user