k5Tests :: TestTree
k5Tests = decisionTestGroup "k5" "Moved permanently? (non-PUT variant)"
  [ testCase "True ==> 301 Moved Permanently" $
      let
        uri = "http://example.com/abc"
        r = resource { movedPermanently = return uri }
      in afterHdrs k5 r req @?= (Done' movedPermanently301, HashMap.singleton hLocation [uri])
  , testCase "False ==> l5" $
      after' k5 resource req @?= Decision' "l5"
  ]
k5Tests :: TestTree
k5Tests = decisionTestGroup "k5" "Moved permanently? (non-PUT variant)"
  [ testCase "True ==> 301 Moved Permanently" $
      let
        uri = "http://example.com/abc"
        r = resource { movedPermanently = return uri }
      in afterHdrs k5 r req @?= (Done' movedPermanently301, HashMap.singleton hLocation [uri])
  , testCase "False ==> l5" $
      after' k5 resource req @?= Decision' "l5"
  ]
k5Tests = decisionTestGroup "k5" "Moved permanently? (non-PUT variant)"
  [ testCase "True ==> 301 Moved Permanently" $
      let
        uri = "http://example.com/abc"
        r = resource { movedPermanently = return uri }
      in afterHdrs k5 r req @?= (Done' movedPermanently301, HashMap.singleton hLocation [uri])
  , testCase "False ==> l5" $
      after' k5 resource req @?= Decision' "l5"
  ]