i4Tests :: TestTree
i4Tests = decisionTestGroup "i4" "Moved permanently? (apply PUT to different URI)"
  [ testCase "True ==> 301 Moved Permanently" $
      let
        loc = "http://example.com/abc"
        r = resource { movedPermanently = return loc }
      in afterHdrs i4 r req @?= (Done' movedPermanently301, HashMap.singleton hLocation [loc])
  , testCase "False ==> p3" $
      after' i4 resource req @?= Decision' "p3"
  ]
i4Tests :: TestTree
i4Tests = decisionTestGroup "i4" "Moved permanently? (apply PUT to different URI)"
  [ testCase "True ==> 301 Moved Permanently" $
      let
        loc = "http://example.com/abc"
        r = resource { movedPermanently = return loc }
      in afterHdrs i4 r req @?= (Done' movedPermanently301, HashMap.singleton hLocation [loc])
  , testCase "False ==> p3" $
      after' i4 resource req @?= Decision' "p3"
  ]
i4Tests = decisionTestGroup "i4" "Moved permanently? (apply PUT to different URI)"
  [ testCase "True ==> 301 Moved Permanently" $
      let
        loc = "http://example.com/abc"
        r = resource { movedPermanently = return loc }
      in afterHdrs i4 r req @?= (Done' movedPermanently301, HashMap.singleton hLocation [loc])
  , testCase "False ==> p3" $
      after' i4 resource req @?= Decision' "p3"
  ]