1-- | @Servant.QuickCheck@ provides utilities related to using QuickCheck over an API.
2-- Rather than specifying properties that individual handlers must satisfy,
3-- you can state properties that ought to hold true of the entire API.
5-- While the API must be described with @servant@ types, the server being
6-- tested itself need not be implemented with @servant-server@ (or indeed,
9-- The documentation of the <#useful-preds Useful predicates> sections is
10-- meant to serve as a set of helpful pointers for learning more about best
11-- practices concerning REST APIs.
12module Servant.QuickCheck
18 -- *** #useful-preds# Useful predicates
19 -- | The predicates below are often useful. Some check RFC compliance; some are
20 -- best practice, and some are useful to check that APIs follow in-house
21 -- best-practices. Included in the documentation for each is a list of
22 -- references to any relevant RFCs and other links, as well as what type of
23 -- predicate it is (__RFC Compliance__, __Best Practice__, __Optional__).
25 -- RFCs distinguish between the force of requirements (e.g. __MUST__ vs.
26 -- __SHOULD__). __RFC Compliance__ includes any absolute requirements present
27 -- in RFCs. The __Best Practices__ includes, in addition to RFC
28 -- recommendations, recommendations found elsewhere or generally accepted.
31 , notAllowedContainsAllowHeader
32 , unauthorizedContainsWWWAuthenticate
33 , getsHaveCacheControlHeader
34 , headsHaveCacheControlHeader
35 -- *** Predicate utilities and types
38 , ResponsePredicate(..)
39 , RequestPredicate(..)
43 -- ** Response equality
44 -- | Often the normal equality of responses is not what we want. For example,
45 -- if responses contain a @Date@ header with the time of the response,
46 -- responses will fail to be equal even though they morally are. This datatype
47 -- represents other means of checking equality
48 -- *** Useful @ResponseEquality@s
51 -- ** Response equality type
52 , ResponseEquality(..)
54 -- * Test setup helpers
55 -- | Helpers to setup and teardown @servant@ servers during tests.
57 , withServantServerAndContext
66import Servant.QuickCheck.Internal
67import Servant.Client (BaseUrl(..), Scheme(..))
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list