【发布时间】:2013-11-29 11:49:42
【问题描述】:
我的联系人公式页面的一个测试用例是分别使用 SSL 确保它始终处于安全上下文中。基本上,我只想知道,我有一个给定的请求,request.secure = true;
以下响应不包含任何有关此的信息,并且其标头为空:
@Test
public void shouldShowContactForm() {
Response response = GET("/contact");
// How can I ask the response, if the complete URL is in HTTPS?
}
即使我明确设置了自己的请求,我也看不到正确的方法:
@Test
public void shouldShowContactFormInSSLContext() {
Request request = newRequest();
request.secure = true;
Response response = GET(request, "/contact");
// Is it now possible?
}
这甚至是测试这个的正确方法还是我只是错过了有关请求/响应的重要内容?
【问题讨论】:
标签: java testing https playframework-1.x