This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "snap-server".

The branch, master has been updated
       via  c5eb3b9503a627cb2cbef7347d59c786796930af (commit)
      from  71e522d0cebb5055a648c0e7c57a9cfeebbe1762 (commit)


Summary of changes:
 test/suite/Test/Blackbox.hs |   19 +++----------------
 1 files changed, 3 insertions(+), 16 deletions(-)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit c5eb3b9503a627cb2cbef7347d59c786796930af
Author: Gregory Collins <[email protected]>
Date:   Sat Jun 18 14:57:11 2011 -0400

    ...and it would be helpful to actually modify all of the tests

diff --git a/test/suite/Test/Blackbox.hs b/test/suite/Test/Blackbox.hs
index 8086e53..70283cf 100644
--- a/test/suite/Test/Blackbox.hs
+++ b/test/suite/Test/Blackbox.hs
@@ -218,15 +218,8 @@ testFileUpload ssl port name =
         let uri = (if ssl then "https" else "http")
                   ++ "://127.0.0.1:" ++ show port ++ "/upload/handle"
 
-
-        req0 <- QC.run $ HTTP.parseUrl uri
-        let req = req0 { HTTP.requestBody = HTTP.RequestBodyLBS $ body kvps
-                       , HTTP.method = "POST"
-                       , HTTP.requestHeaders = hdrs }
-
         let txt = response kvps
-        rsp <- QC.run $ HTTP.withManager $ HTTP.httpLbs req
-        let doc = HTTP.responseBody rsp
+        doc <- QC.run $ post uri (body kvps) hdrs
 
         when (txt /= doc) $ QC.run $ do
                      L.putStrLn "expected:"
@@ -252,14 +245,8 @@ testRot13 ssl port name =
         let uri = (if ssl then "https" else "http")
                   ++ "://127.0.0.1:" ++ show port ++ "/rot13"
 
-        req0 <- QC.run $ HTTP.parseUrl uri
-        let req = req0 { HTTP.requestBody = HTTP.RequestBodyLBS $
-                                            L.fromChunks [txt]
-                       , HTTP.method = "POST" }
-
-        rsp <- QC.run $ HTTP.withManager $ HTTP.httpLbs req
-        let doc = S.concat $ L.toChunks $ HTTP.responseBody rsp
-
+        doc <- QC.run $ liftM (S.concat . L.toChunks)
+                      $ post uri (L.fromChunks [txt]) []
         QC.assert $ txt == rot13 doc
 
 
-----------------------------------------------------------------------


hooks/post-receive
-- 
snap-server
_______________________________________________
Snap mailing list
[email protected]
https://mailman-mail5.webfaction.com/listinfo/snap

Reply via email to