cancelPreview = do
  bodyContains "Preview your submission"

  action <- formActionValue ".articleDetailBody form"
  liftIO $ I.unpack action `shouldStartWith` "/blog/"

  let req = do setMethod methodPost
               setUrl $ "http://localhost:3000" ++ I.unpack action
               addPostParam "cancel" "Cancel"
               addToken
  I.request req
  statusIs 200
  bodyContains "Blog View"
  bodyContains "You are logged in as root."
cancelPreview = do
  bodyContains "Preview your submission"

  action <- formActionValue ".articleDetailBody form"
  liftIO $ I.unpack action `shouldStartWith` "/blog/"

  let req = do setMethod methodPost
               setUrl $ "http://localhost:3000" ++ I.unpack action
               addPostParam "cancel" "Cancel"
               addToken
  I.request req
  statusIs 200
  bodyContains "Blog View"
  bodyContains "You are logged in as root."
cancelPreview = do
  bodyContains "Preview your submission"

  action <- formActionValue ".articleDetailBody form"
  liftIO $ I.unpack action `shouldStartWith` "/blog/"

  let req = do setMethod methodPost
               setUrl $ "http://localhost:3000" ++ I.unpack action
               addPostParam "cancel" "Cancel"
               addToken
  I.request req
  statusIs 200
  bodyContains "Blog View"
  bodyContains "You are logged in as root."