c3Tests :: TestTree
c3Tests = decisionTestGroup "c3" "Accept exists?"
  [ testCase "True ==> c4 + default media type" $
      let rq = req { reqHeaders = HashMap.singleton hAccept ["text/html"] }
      in afterMediaType c3 resource rq @?= (Decision' "c4", "application" // "octet-stream")
  , testCase "False ==> c4 w/o media type" $
      let
        r = resource { contentTypesProvided = return [("text" // "html", return "")] }
      in afterMediaType c3 r req @?= (Decision' "d4", "text" // "html")
  ] where
    afterMediaType s r rq = case after s r rq of
      (d, rd) -> (d, _reqDataRespMediaType rd)
c3Tests :: TestTree
c3Tests = decisionTestGroup "c3" "Accept exists?"
  [ testCase "True ==> c4 + default media type" $
      let rq = req { reqHeaders = HashMap.singleton hAccept ["text/html"] }
      in afterMediaType c3 resource rq @?= (Decision' "c4", "application" // "octet-stream")
  , testCase "False ==> c4 w/o media type" $
      let
        r = resource { contentTypesProvided = return [("text" // "html", return "")] }
      in afterMediaType c3 r req @?= (Decision' "d4", "text" // "html")
  ] where
    afterMediaType s r rq = case after s r rq of
      (d, rd) -> (d, _reqDataRespMediaType rd)
c3Tests = decisionTestGroup "c3" "Accept exists?"
  [ testCase "True ==> c4 + default media type" $
      let rq = req { reqHeaders = HashMap.singleton hAccept ["text/html"] }
      in afterMediaType c3 resource rq @?= (Decision' "c4", "application" // "octet-stream")
  , testCase "False ==> c4 w/o media type" $
      let
        r = resource { contentTypesProvided = return [("text" // "html", return "")] }
      in afterMediaType c3 r req @?= (Decision' "d4", "text" // "html")
  ] where
    afterMediaType s r rq = case after s r rq of
      (d, rd) -> (d, _reqDataRespMediaType rd)