packages feed

tasty-wai 0.1.0.1 → 0.1.1.0

raw patch · 3 files changed

+20/−3 lines, 3 filesdep ~basedep ~tastyPVP: major bump suggested

API removals or changes: PVP suggests a major version bump

Dependency ranges changed: base, tasty

API changes (from Hackage documentation)

+ Test.Tasty.Wai: buildRequestWithHeaders :: StdMethod -> ByteString -> ByteString -> RequestHeaders -> SRequest
- Test.Tasty.Wai: S :: Application -> TestName -> (Session ()) -> Sess
+ Test.Tasty.Wai: S :: Application -> TestName -> Session () -> Sess

Files

CHANGELOG.md view
@@ -1,5 +1,9 @@ # Revision history for tasty-wai +## 0.1.1.0 -- 2019-01-09++* Add `buildRequestWithHeaders` function.+ ## 0.1.0.1 -- 2018-12-04  * Add README to the extra-source-files.
src/Test/Tasty/Wai.hs view
@@ -17,6 +17,7 @@     -- * Request Builders   , buildRequest   , buildRequestWithBody+  , buildRequestWithHeaders    , module Network.Wai.Test   ) where@@ -27,7 +28,7 @@ import qualified Data.ByteString.Lazy as LBS import           Data.Monoid          ((<>)) -import           Network.HTTP.Types   (StdMethod)+import           Network.HTTP.Types   (RequestHeaders, StdMethod) import qualified Network.HTTP.Types   as HTTP  import           Test.Tasty.Providers (IsTest (..), Progress (..), TestName,@@ -35,7 +36,8 @@                                        testPassed) import           Test.Tasty.Runners   (formatMessage) -import           Network.Wai          (Application, Request, requestMethod)+import           Network.Wai          (Application, Request, requestHeaders,+                                       requestMethod) import           Network.Wai.Test  -- | Data structure for carrying around the info needed to build and run a test.@@ -76,6 +78,17 @@   -> SRequest buildRequestWithBody mth rpath =   SRequest (buildRequest mth rpath)++-- | As per 'buildRequestWithBody' but allows for the setting of 'RequestHeaders'.+buildRequestWithHeaders+  :: StdMethod+  -> BS.ByteString+  -> LBS.ByteString+  -> RequestHeaders+  -> SRequest+buildRequestWithHeaders mthd pth bdy hdrs =+  rq { simpleRequest = (simpleRequest rq) { requestHeaders = hdrs } }+  where rq = buildRequestWithBody mthd pth bdy  -- | Run a test case against a 'Application'. --
tasty-wai.cabal view
@@ -2,7 +2,7 @@ -- documentation, see http://haskell.org/cabal/users-guide/  name:                tasty-wai-version:             0.1.0.1+version:             0.1.1.0 synopsis:            Test 'wai' endpoints via Test.Tasty description:         Helper functions and runners for testing wai endpoints using the Tasty testing infrastructure. license:             BSD3