【发布时间】:2014-10-22 23:05:43
【问题描述】:
如何测试控制器是否使用 play framework 2.3 中的反向路由重定向到特定位置?我想做这样的事情:
"LoginController#authenticate" should{
"Redirect to index on success" in{
...
val result = loginControllerTest.authenticate.apply(request)
redirectLocation(result) must be(routes.Application.index)
}
【问题讨论】:
标签: scala testing playframework-2.0 specs2