o14Tests :: TestTree
o14Tests = decisionTestGroup "o14" "Conflict? (resource exists)"
  [ testCase "True ==> 409 Conflict" $
      let r = resource { isConflict = return True }
      in after' o14 r req @?= error' conflict409
  , testCase "False + no acceptable content type ==> 415 Unsupported Media Type" $
      after' o14 resource req @?= error' unsupportedMediaType415
  , testCase "False + acceptable content type ==> p11" $
      let
        r = resource { contentTypesAccepted = return [("text" // "html", return ())] }
        rq = req { reqHeaders = HashMap.singleton hContentType ["text/html"] }
      in after' o14 r rq @?= Decision' "p11"
  ]
o14Tests :: TestTree
o14Tests = decisionTestGroup "o14" "Conflict? (resource exists)"
  [ testCase "True ==> 409 Conflict" $
      let r = resource { isConflict = return True }
      in after' o14 r req @?= error' conflict409
  , testCase "False + no acceptable content type ==> 415 Unsupported Media Type" $
      after' o14 resource req @?= error' unsupportedMediaType415
  , testCase "False + acceptable content type ==> p11" $
      let
        r = resource { contentTypesAccepted = return [("text" // "html", return ())] }
        rq = req { reqHeaders = HashMap.singleton hContentType ["text/html"] }
      in after' o14 r rq @?= Decision' "p11"
  ]
o14Tests = decisionTestGroup "o14" "Conflict? (resource exists)"
  [ testCase "True ==> 409 Conflict" $
      let r = resource { isConflict = return True }
      in after' o14 r req @?= error' conflict409
  , testCase "False + no acceptable content type ==> 415 Unsupported Media Type" $
      after' o14 resource req @?= error' unsupportedMediaType415
  , testCase "False + acceptable content type ==> p11" $
      let
        r = resource { contentTypesAccepted = return [("text" // "html", return ())] }
        rq = req { reqHeaders = HashMap.singleton hContentType ["text/html"] }
      in after' o14 r rq @?= Decision' "p11"
  ]