mirror of
https://github.com/google/nomulus.git
synced 2025-08-02 07:52:11 +02:00
Standardize test methods to be prefixed with "test"
------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=131176866
This commit is contained in:
parent
52bb8a5773
commit
8f0f701ff7
9 changed files with 43 additions and 46 deletions
|
@ -59,39 +59,39 @@ public class ConsoleUiActionTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void webPage_disallowsIframe() throws Exception {
|
||||
public void testWebPage_disallowsIframe() throws Exception {
|
||||
action.run();
|
||||
assertThat(response.getHeaders()).containsEntry("X-Frame-Options", "SAMEORIGIN");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void webPage_setsHtmlUtf8ContentType() throws Exception {
|
||||
public void testWebPage_setsHtmlUtf8ContentType() throws Exception {
|
||||
action.run();
|
||||
assertThat(response.getContentType()).isEqualTo(MediaType.HTML_UTF_8);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void webPage_containsUserNickname() throws Exception {
|
||||
public void testWebPage_containsUserNickname() throws Exception {
|
||||
action.run();
|
||||
assertThat(response.getPayload()).contains("marla.singer");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void userHasAccessAsTheRegistrar_showsRegistrarConsole() throws Exception {
|
||||
public void testUserHasAccessAsTheRegistrar_showsRegistrarConsole() throws Exception {
|
||||
action.run();
|
||||
assertThat(response.getPayload()).contains("Registrar Console");
|
||||
assertThat(response.getPayload()).contains("reg-content-and-footer");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void consoleDisabled_showsDisabledPage() throws Exception {
|
||||
public void testConsoleDisabled_showsDisabledPage() throws Exception {
|
||||
action.enabled = false;
|
||||
action.run();
|
||||
assertThat(response.getPayload()).contains("<h1>Console is disabled</h1>");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void userDoesntHaveAccessToAnyRegistrar_showsWhoAreYouPage() throws Exception {
|
||||
public void testUserDoesntHaveAccessToAnyRegistrar_showsWhoAreYouPage() throws Exception {
|
||||
when(sessionUtils.checkRegistrarConsoleLogin(any(HttpServletRequest.class))).thenReturn(false);
|
||||
action.run();
|
||||
assertThat(response.getPayload()).contains("<h1>You need permission</h1>");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue