Skip to content

Commit

Permalink
[JENKINS-21261] while I originally misdiagnosed the problem, the test…
Browse files Browse the repository at this point in the history
… is still marginally useful.
  • Loading branch information
kohsuke committed Feb 15, 2014
1 parent bc806cc commit c88698c
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions test/src/test/java/hudson/tasks/junit/CaseResultTest.java
Expand Up @@ -181,6 +181,19 @@ public void testRemoteApiNameOnly() throws Exception {
assertTrue("Should have found 0 elements, but found " + found, found == 0);
}

/**
* Makes sure the summary page remains text/plain (see commit 7089a81 in JENKINS-1544) but
* the index page must be in text/html.
*/
@Bug(21261)
public void testContentType() throws Exception {
configureTestBuild("foo");
WebClient wc = createWebClient();
wc.goTo("job/foo/1/testReport/org.twia.vendor/VendorManagerTest/testCreateAdjustingFirm/","text/html");

wc.goTo("job/foo/1/testReport/org.twia.vendor/VendorManagerTest/testCreateAdjustingFirm/summary","text/plain");
}

private FreeStyleBuild configureTestBuild(String projectName) throws Exception {
FreeStyleProject p = projectName == null ? createFreeStyleProject() : createFreeStyleProject(projectName);
p.getBuildersList().add(new TestBuilder() {
Expand Down

0 comments on commit c88698c

Please sign in to comment.