use of play.mvc.Http.Response in project play-cookbook by spinscale.
the class UserRightTest method testSecretsAreDeniedForUser.
@Test
public void testSecretsAreDeniedForUser() {
login("user", "user");
Response response = GET("/top-secret");
assertStatus(403, response);
}
use of play.mvc.Http.Response in project play-cookbook by spinscale.
the class UserRightTest method testSecretsWork.
@Test
public void testSecretsWork() {
login("user", "user");
Response response = GET("/secret");
assertIsOk(response);
assertContentEquals("This is secret", response);
}
use of play.mvc.Http.Response in project play-cookbook by spinscale.
the class UserRightTest method testSuperSecretsAreAllowedForAdmin.
@Test
public void testSuperSecretsAreAllowedForAdmin() {
login("admin", "admin");
Response response = GET("/top-secret");
assertIsOk(response);
assertContentEquals("This is top secret", response);
}
Aggregations