testNoAcceptEncoding :: Test
testNoAcceptEncoding = testProperty "gzip/noAcceptEncoding" $
                       monadicIO $
                       forAllM arbitrary prop
  where
    prop :: L.ByteString -> PropertyM IO ()
    prop s = liftQ $ do
        -- if there's no accept-encoding, withCompression should be a no-op
        (!_,!rsp) <- goNoHeaders (seqSnap $ withCompression
                                          $ textPlain s)
        assertEqual "" Nothing $ getHeader "Content-Encoding" rsp
        assertEqual "" Nothing $ getHeader "Vary" rsp

        body <- Test.getResponseBody rsp
        assertEqual "" s $ L.fromChunks [body]


------------------------------------------------------------------------------
testNoAcceptEncoding :: Test
testNoAcceptEncoding = testProperty "gzip/noAcceptEncoding" $
                       monadicIO $
                       forAllM arbitrary prop
  where
    prop :: L.ByteString -> PropertyM IO ()
    prop s = liftQ $ do
        -- if there's no accept-encoding, withCompression should be a no-op
        (!_,!rsp) <- goNoHeaders (seqSnap $ withCompression
                                          $ textPlain s)
        assertEqual "" Nothing $ getHeader "Content-Encoding" rsp
        assertEqual "" Nothing $ getHeader "Vary" rsp

        body <- Test.getResponseBody rsp
        assertEqual "" s $ L.fromChunks [body]


------------------------------------------------------------------------------
testNoAcceptEncoding = testProperty "gzip/noAcceptEncoding" $
                       monadicIO $
                       forAllM arbitrary prop
  where
    prop :: L.ByteString -> PropertyM IO ()
    prop s = liftQ $ do
        -- if there's no accept-encoding, withCompression should be a no-op
        (!_,!rsp) <- goNoHeaders (seqSnap $ withCompression
                                          $ textPlain s)
        assertEqual "" Nothing $ getHeader "Content-Encoding" rsp
        assertEqual "" Nothing $ getHeader "Vary" rsp

        body <- Test.getResponseBody rsp
        assertEqual "" s $ L.fromChunks [body]


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