+
+ @Test
+ public void testAgentWithoutValidChallenge() throws IOException, GigiApiException {
+ User agent = User.getById(createVerificationUser("testworker", "testname", createUniqueName() + "@testdom.com", TEST_PASSWORD));
+ addChallenge(agent.getId(), CATSType.ORG_AGENT_CHALLENGE);
+ loginCertificate = null;
+ cookie = cookieWithCertificateLogin(agent);
+ URLConnection uc = get(cookie, ViewOrgPage.DEFAULT_PATH);
+ assertEquals(403, ((HttpURLConnection) uc).getResponseCode());
+ uc = get(cookie, CreateOrgPage.DEFAULT_PATH);
+ assertEquals(403, ((HttpURLConnection) uc).getResponseCode());
+ }