[Scala 2.5.3] play.api.test.route ignores FakeRequest path in multiproject?

53 views
Skip to first unread message

Michael Slinn

unread,
May 29, 2016, 1:22:32 PM5/29/16
to play-framework
The following code (taken from my demo app on GitHub) suggests to me that play.api.test.route ignores the FakeRequest path. This unit test is written with scalatestplus-play 1.5.1.

route(app, FakeRequest(GET, "/b/serviceB")).foreach { result =>
  status(result) mustBe OK  // not sure why this fails with status 404
  contentAsString(result) must include ("This is serviceB")
}

Does not matter what path I provide, I always get an HTTP status 404 back. BTW, this webapp uses 3 subprojects, this test should use the subproject with the /b routing prefix. I tried not using the prefix, not prefixing with a slash ... always 404. Click through the link above to see the rest of the code.

Michael Slinn

unread,
Jun 6, 2016, 1:13:27 PM6/6/16
to play-framework
Anybody?
Reply all
Reply to author
Forward
0 new messages