1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42
|
--- a/test/Network/HTTP/ClientSpec.hs
+++ b/test/Network/HTTP/ClientSpec.hs
@@ -12,38 +12,4 @@ main :: IO ()
main = hspec spec
spec :: Spec
-spec = describe "Client" $ do
- it "works" $ withSocketsDo $ do
- req <- parseUrl "http://httpbin.org/"
- man <- newManager defaultManagerSettings
- res <- httpLbs req man
- responseStatus res `shouldBe` status200
-
- describe "method in URL" $ do
- it "success" $ withSocketsDo $ do
- req <- parseUrl "POST http://httpbin.org/post"
- man <- newManager defaultManagerSettings
- res <- httpLbs req man
- responseStatus res `shouldBe` status200
-
- it "failure" $ withSocketsDo $ do
- req' <- parseUrl "PUT http://httpbin.org/post"
- let req = req'
- { checkStatus = \_ _ _ -> Nothing
- }
- man <- newManager defaultManagerSettings
- res <- httpLbs req man
- responseStatus res `shouldBe` status405
-
- it "managerModifyRequest" $ do
- let modify req = return req { port = 80 }
- settings = defaultManagerSettings { managerModifyRequest = modify }
- withManager settings $ \man -> do
- res <- httpLbs "http://httpbin.org:1234" man
- responseStatus res `shouldBe` status200
-
- it "managerModifyRequestCheckStatus" $ do
- let modify req = return req { checkStatus = \s hs cj -> Just $ toException $ StatusCodeException s hs cj }
- settings = defaultManagerSettings { managerModifyRequest = modify }
- withManager settings $ \man ->
- httpLbs "http://httpbin.org" man `shouldThrow` anyException
+spec = return ()
|