leanovate / play-mockws

Mock WS client for Play Framework

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Play 2.6 tests use deprecated Action

oripwk opened this issue · comments

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") }

Do you have any solution for this?

Yeah, you should inject DefaultActionBuilder and do a

defaultActionBuilder { request => ... }

instead of Action { request => ... }

Thx for the pointer!

Can you make a PR with one example to see if it's something we can generalize?

Yeah, I'll try to in the evening

Hi,

See pull request
#28