Skip to content

Commit

Permalink
Fixing a test to match commit 0f49c42
Browse files Browse the repository at this point in the history
  • Loading branch information
barancev committed Jun 27, 2018
1 parent 9d766a1 commit e79c914
Showing 1 changed file with 8 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,13 @@

package org.openqa.grid.web.servlet;

import static org.hamcrest.CoreMatchers.containsString;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertThat;
import static org.junit.Assert.assertTrue;

import org.hamcrest.CoreMatchers;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
Expand All @@ -35,7 +38,6 @@
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletResponse;

@RunWith(JUnit4.class)
public class DisplayHelpServletTest extends BaseServletTest {

@Before
Expand All @@ -59,11 +61,12 @@ public void testGetHelpPageForStandalone() throws IOException, ServletException

FakeHttpServletResponse response = sendCommand("GET", "/");
assertEquals(HttpServletResponse.SC_OK, response.getStatus());
assertNotNull(response.getBody());

assertTrue(response.getBody().contains("Whoops! The URL specified routes to this help page."));
assertTrue(response.getBody().contains("\"type\": \"Standalone\""));
assertTrue(response.getBody().contains("\"consoleLink\": \"/wd/hub\""));
String body = response.getBody();
assertNotNull(body);
assertThat(body, containsString("Whoops! The URL specified routes to this help page."));
assertThat(body, containsString("\"type\": \"Standalone\""));
assertThat(body, containsString("\"consoleLink\": \"\\u002fwd\\u002fhub\""));
}

@Test
Expand Down

0 comments on commit e79c914

Please sign in to comment.