Fix tests: force HTTP/1.1 in a few places

This commit is contained in:
Michael Snoyman 2013-12-03 11:57:56 +02:00
parent c670c54ba4
commit f85b38e817
2 changed files with 4 additions and 1 deletions

View File

@ -8,6 +8,7 @@ import Network.Wai
import qualified Data.ByteString.Char8 as S8
import qualified Data.Text as T
import Data.List (isSuffixOf)
import qualified Network.HTTP.Types as H
data App = App
@ -51,6 +52,7 @@ test method path f = it (method ++ " " ++ path) $ do
, requestHeaders =
if not $ isSuffixOf "json" path then [] else
[("Accept", S8.pack "application/json")]
, httpVersion = H.http11
}
f sres

View File

@ -45,7 +45,8 @@ specs = describe "Redirect" $ do
it "303 redirect for regular, HTTP 1.1" $ app $ do
res <- request defaultRequest {
pathInfo = ["rregular"]
pathInfo = ["rregular"],
httpVersion = H.http11
}
assertStatus 303 res
assertBodyContains "" res