1{-# LANGUAGE OverloadedStrings #-}
3module ResponseHeaderSpec (main, spec) where
6import qualified Network.HTTP.Types as H
7import Network.Wai.Handler.Warp.ResponseHeader
14spec = describe "composeHeader" $ do
15 it "composes a HTTP header" $
16 composeHeader H.http11 H.ok200 headers `shouldReturn` composedHeader
18headers :: H.ResponseHeaders
20 ("Date", "Mon, 13 Aug 2012 04:22:55 GMT")
21 , ("Content-Lenght", "151")
22 , ("Server", "Mighttpd/2.5.8")
23 , ("Last-Modified", "Fri, 22 Jun 2012 01:18:08 GMT")
24 , ("Content-Type", "text/html")
27composedHeader :: ByteString
28composedHeader = "HTTP/1.1 200 OK\r\nDate: Mon, 13 Aug 2012 04:22:55 GMT\r\nContent-Lenght: 151\r\nServer: Mighttpd/2.5.8\r\nLast-Modified: Fri, 22 Jun 2012 01:18:08 GMT\r\nContent-Type: text/html\r\n\r\n"
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