Play 2.6 tests use deprecated Action
oripwk opened this issue · comments
Ori Popowski commented
When cloning and running sbt test
there are a lot of the following warnings:
object Action in package mvc is deprecated (since 2.6.0): Inject an ActionBuilder (e.g. DefaultActionBuilder) or extend BaseController/AbstractController/InjectedController
[warn] case ("PATCH", "/patch") => Action { Ok("patch ok") }
Yann Simon commented
Do you have any solution for this?
Ori Popowski commented
Yeah, you should inject DefaultActionBuilder
and do a
defaultActionBuilder { request => ... }
instead of Action { request => ... }
Yann Simon commented
Thx for the pointer!
Can you make a PR with one example to see if it's something we can generalize?
Ori Popowski commented
Yeah, I'll try to in the evening
Ori Popowski commented
Hi,
See pull request
#28