Calls to HTTP methods in HttpResponse fail
In Lift it is currently not possible to call get, post, delete, etc. on an instance of TestFramework's HttpResponse. To demonstrate, this is what I get on the console:
It seems that the implicit responseCapture doesn't play well with the self type. This is what I get when I provide the capture explicitly:
This makes it impossible to use the same session as the previous request, at least in the way it was done before.
Is there a way to do it at all, as a workaround?
<console>:8: error: no implicit argument matching parameter type (String, org.apache.commons.httpclient.HttpClient, org.apache.commons.httpclient.HttpMethodBase) => login.ResponseType was found.
object MyTest extends TestKit { val baseUrl = ""; for (login <- post("/whatever"); next <- login.get("/bla")) {} }
^
It seems that the implicit responseCapture doesn't play well with the self type. This is what I get when I provide the capture explicitly:
<console>:8: error: type mismatch;
found : net.liftweb.http.testing.Response
required: login.ResponseType
object MyTest extends TestKit { val baseUrl = ""; for (login <- post("/whatever"); next <- login.get("/bla")(responseCapture)) {} }
^
This makes it impossible to use the same session as the previous request, at least in the way it was done before.
Is there a way to do it at all, as a workaround?
Leave a comment
(In revision:d24fc7c63d4356bb6ac83cc543b7fd5e3b80ba28) Closes #549. Updated the type mechanics in TestFramework and added tests that should compile correctly
Branch: master
Branch: master