Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@kdazzle
Copy link
Contributor

@kdazzle kdazzle commented Jul 19, 2016

Purpose

Documentation fix

The docs are explaining how to use a FakeRequest here, but the example omits that. Here is the original:

You can also retrieve an action reference from the reverse router and invoke it. This also allows you to use FakeRequest which is a mock for request data:

@Test
public void testCallIndex() {
  Result result = route(
    controllers.routes.HomeController.index(),
  );
  assertEquals(OK, result.status());
}

kdazzle added 2 commits July 19, 2016 13:29
The docs are explaining how to use a FakeRequest, but the example omits that. Here is the original:

> You can also retrieve an action reference from the reverse router and invoke it. This also allows you to use FakeRequest which is a mock for request data:

> ```
@test
public void testCallIndex() {
  Result result = route(
    controllers.routes.HomeController.index(),
  );
  assertEquals(OK, result.status());
}
```
Got too eager and didn't even check to make sure everything compiled.
@gmethvin gmethvin merged commit 0c942f3 into playframework:2.5.x Jul 23, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants