Merge branch 'rc'

This commit is contained in:
Kohsuke Kawaguchi committed 2012-09-10 12:33:07 -07:00
commit f024fb0fa6
1 file changed
+14 -2
@@ -34,10 +34,22 @@ public class DownloadServiceTest extends HudsonTestCase {
@Bug(5536)
public void testPost() throws Exception {
// initially it should fail because the data doesn't have a signature
assertNull(job.getData());
createWebClient().goTo("/self/testPost");
JSONObject d = job.getData();
assertEquals(hashCode(),d.getInt("hello"));
assertNull(job.getData());
// and now it should work
DownloadService.signatureCheck = false;
try {
createWebClient().goTo("/self/testPost");
JSONObject d = job.getData();
assertEquals(hashCode(),d.getInt("hello"));
} finally {
DownloadService.signatureCheck = true;
}
// TODO: test with a signature
}
/**