e6Tests :: TestTree
e6Tests = decisionTestGroup "e6" "Acceptable Charset available?"
  [ testCase "True ==> f6" $
      let r = resource { charsetsProvided = provideCharsets $ return ("utf-8", id) }
      in afterCharset (e6 "utf-8") r req @?= (Decision' "f6", Just "utf-8")
  , testCase "no charsets provided ==> f6 w/o charset" $
      afterCharset (e6 "utf-8") resource req @?= (Decision' "f6", Nothing)
  , testCase "False ==> 406 Not Acceptable" $
      let r = resource { charsetsProvided = provideCharsets $ return ("wtf-9", id) }
      in after' (e6 "utf-8") r req @?= Error' notAcceptable406 "No acceptable charset available"
  ]
e6Tests :: TestTree
e6Tests = decisionTestGroup "e6" "Acceptable Charset available?"
  [ testCase "True ==> f6" $
      let r = resource { charsetsProvided = provideCharsets $ return ("utf-8", id) }
      in afterCharset (e6 "utf-8") r req @?= (Decision' "f6", Just "utf-8")
  , testCase "no charsets provided ==> f6 w/o charset" $
      afterCharset (e6 "utf-8") resource req @?= (Decision' "f6", Nothing)
  , testCase "False ==> 406 Not Acceptable" $
      let r = resource { charsetsProvided = provideCharsets $ return ("wtf-9", id) }
      in after' (e6 "utf-8") r req @?= Error' notAcceptable406 "No acceptable charset available"
  ]
e6Tests = decisionTestGroup "e6" "Acceptable Charset available?"
  [ testCase "True ==> f6" $
      let r = resource { charsetsProvided = provideCharsets $ return ("utf-8", id) }
      in afterCharset (e6 "utf-8") r req @?= (Decision' "f6", Just "utf-8")
  , testCase "no charsets provided ==> f6 w/o charset" $
      afterCharset (e6 "utf-8") resource req @?= (Decision' "f6", Nothing)
  , testCase "False ==> 406 Not Acceptable" $
      let r = resource { charsetsProvided = provideCharsets $ return ("wtf-9", id) }
      in after' (e6 "utf-8") r req @?= Error' notAcceptable406 "No acceptable charset available"
  ]