diff --git a/yesod-test/ChangeLog.md b/yesod-test/ChangeLog.md index d2cbac990..c4a5e3007 100644 --- a/yesod-test/ChangeLog.md +++ b/yesod-test/ChangeLog.md @@ -1,5 +1,7 @@ # ChangeLog for yesod-test +## 1.6.17 +* add `getCookies`. [#1815](https://github.com/yesodweb/yesod/pull/1815) ## 1.6.16 diff --git a/yesod-test/Yesod/Test.hs b/yesod-test/Yesod/Test.hs index 5f50871c4..adaed3bd6 100644 --- a/yesod-test/Yesod/Test.hs +++ b/yesod-test/Yesod/Test.hs @@ -211,6 +211,8 @@ module Yesod.Test -- * Grab information , getTestYesod , getResponse + , getCookies + , Cookies , getRequestCookies -- * Debug output @@ -330,6 +332,13 @@ getTestYesod = fmap yedSite getSIO getResponse :: YesodExample site (Maybe SResponse) getResponse = fmap yedResponse getSIO +-- | Get the cookies set for the current test. Differs from `getRequestCookies` +-- in that this allows you to access cookies outside of a request builder +-- +-- @since 1.6.17 +getCookies :: YesodExample site Cookies +getCookies = fmap yedCookies getSIO + data RequestBuilderData site = RequestBuilderData { rbdPostData :: RBDPostData , rbdResponse :: (Maybe SResponse) diff --git a/yesod-test/yesod-test.cabal b/yesod-test/yesod-test.cabal index c659ddef0..2e8526f4a 100644 --- a/yesod-test/yesod-test.cabal +++ b/yesod-test/yesod-test.cabal @@ -1,5 +1,5 @@ name: yesod-test -version: 1.6.16 +version: 1.6.17 license: MIT license-file: LICENSE author: Nubis