f7Tests :: TestTree
f7Tests = decisionTestGroup "f7" "Acceptable encoding available?"
  [ testCase "True ==> g7 + encoding" $
      let r = resource { encodingsProvided = return [("gzip", id)] }
      in afterEnc (f7 "gzip") r req @?= (Decision' "g7", Just "gzip")
  , testCase "False ==> g7 + identity" $
      afterEnc (f7 "gzip") resource req @?= (Decision' "g7", Nothing)
  ] where
    afterEnc s r rq = case after s r rq of
      (d, rd) -> (d, _reqDataRespEncoding rd)
f7Tests :: TestTree
f7Tests = decisionTestGroup "f7" "Acceptable encoding available?"
  [ testCase "True ==> g7 + encoding" $
      let r = resource { encodingsProvided = return [("gzip", id)] }
      in afterEnc (f7 "gzip") r req @?= (Decision' "g7", Just "gzip")
  , testCase "False ==> g7 + identity" $
      afterEnc (f7 "gzip") resource req @?= (Decision' "g7", Nothing)
  ] where
    afterEnc s r rq = case after s r rq of
      (d, rd) -> (d, _reqDataRespEncoding rd)
f7Tests = decisionTestGroup "f7" "Acceptable encoding available?"
  [ testCase "True ==> g7 + encoding" $
      let r = resource { encodingsProvided = return [("gzip", id)] }
      in afterEnc (f7 "gzip") r req @?= (Decision' "g7", Just "gzip")
  , testCase "False ==> g7 + identity" $
      afterEnc (f7 "gzip") resource req @?= (Decision' "g7", Nothing)
  ] where
    afterEnc s r rq = case after s r rq of
      (d, rd) -> (d, _reqDataRespEncoding rd)