testCompositionDoesn'tExplode :: Test
testCompositionDoesn'tExplode =
    testProperty "gzip/testCompositionDoesn'tExplode" $
                 monadicIO $
                 forAllM arbitrary prop
  where
    prop :: L.ByteString -> PropertyM IO ()
    prop s = liftQ $ do
        (!_,!rsp) <- goGZip (seqSnap $
                             withCompression $
                             withCompression $
                             withCompression $ textPlain s)

        assertEqual "" (Just "gzip") $ getHeader "Content-Encoding" rsp

        c <- Test.getResponseBody rsp
        let s1 = GZip.decompress $ L.fromChunks [c]
        assertEqual "composition" s s1


------------------------------------------------------------------------------
testCompositionDoesn'tExplode :: Test
testCompositionDoesn'tExplode =
    testProperty "gzip/testCompositionDoesn'tExplode" $
                 monadicIO $
                 forAllM arbitrary prop
  where
    prop :: L.ByteString -> PropertyM IO ()
    prop s = liftQ $ do
        (!_,!rsp) <- goGZip (seqSnap $
                             withCompression $
                             withCompression $
                             withCompression $ textPlain s)

        assertEqual "" (Just "gzip") $ getHeader "Content-Encoding" rsp

        c <- Test.getResponseBody rsp
        let s1 = GZip.decompress $ L.fromChunks [c]
        assertEqual "composition" s s1


------------------------------------------------------------------------------
testCompositionDoesn'tExplode =
    testProperty "gzip/testCompositionDoesn'tExplode" $
                 monadicIO $
                 forAllM arbitrary prop
  where
    prop :: L.ByteString -> PropertyM IO ()
    prop s = liftQ $ do
        (!_,!rsp) <- goGZip (seqSnap $
                             withCompression $
                             withCompression $
                             withCompression $ textPlain s)

        assertEqual "" (Just "gzip") $ getHeader "Content-Encoding" rsp

        c <- Test.getResponseBody rsp
        let s1 = GZip.decompress $ L.fromChunks [c]
        assertEqual "composition" s s1


------------------------------------------------------------------------------