Skip to content

Instantly share code, notes, and snippets.

@ndeverge
Created November 10, 2012 13:57
Show Gist options
  • Save ndeverge/4051165 to your computer and use it in GitHub Desktop.
Save ndeverge/4051165 to your computer and use it in GitHub Desktop.
Un petit refactor pour @JeromeAvoustin (http://twitter.com/JeromeAvoustin/status/267209105188478976)
private Result whenIGenerateABadge(final int idInscription) {
try {
start(fakeApplicationOverloaded());
Map<String, String> map = new HashMap<String, String>();
map.put("nameSelected_" + idInscription, "on");
FakeRequest fakeRequest = fakeRequest(POST, "/admin/badge").withFormUrlEncodedBody(map);
return routeAndCall(fakeRequest);
} finally {
stop(fakeApplicationOverloaded());
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment