About

Metadata

  • Last updated , by glutamate
  • License BSD-3-Clause
  • Categories Web Development, Testing
  • Maintained by: tomn@openbrain.org

  • Lottery factor: 0

Links

Installation

Readme

A simple framework for making assertions about the responses of HTTP servers.

import Test.HTTP
import Data.List (isInfixOf)

main = defaultMain $ httpTestCase "BayesHive landing page" "https://bayeshive.com" $ do
    landing <- get "/"
    assert "Correct blog link" $
      "href=\"https://bayeshive.com/blog\"" `isInfixOf` landing
    loginResult <- postForm "/auth/page/email/login"
                     [("email", "foo"), ("password", "bar")]
    debug loginResult