Contact authInfo should not be visible to all registrars in <info> flows

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=133960014
This commit is contained in:
cgoldfeder 2016-09-22 09:06:43 -07:00 committed by Ben McIlwain
parent 4813ed392b
commit 740d49e22e
4 changed files with 105 additions and 1 deletions

View file

@ -118,6 +118,49 @@ public class ContactInfoFlowTest extends ResourceFlowTestCase<ContactInfoFlow, C
assertNoBillingEvents();
}
@Test
public void testSuccess_owningRegistrarWithoutAuthInfo_seesAuthInfo() throws Exception {
setEppInput("contact_info_no_authinfo.xml");
persistContactResource(true);
// Check that the persisted contact info was returned.
assertTransactionalFlow(false);
runFlowAssertResponse(
readFile("contact_info_response.xml"),
// We use a different roid scheme than the samples so ignore it.
"epp.response.resData.infData.roid");
assertNoHistory();
assertNoBillingEvents();
}
@Test
public void testSuccess_otherRegistrarWithoutAuthInfio_doesNotSeeAuthInfo() throws Exception {
setClientIdForFlow("NewRegistrar");
setEppInput("contact_info_no_authinfo.xml");
persistContactResource(true);
// Check that the persisted contact info was returned.
assertTransactionalFlow(false);
runFlowAssertResponse(
readFile("contact_info_response_no_authinfo.xml"),
// We use a different roid scheme than the samples so ignore it.
"epp.response.resData.infData.roid");
assertNoHistory();
assertNoBillingEvents();
}
@Test
public void testSuccess_otherRegistrarWithAuthInfo_seesAuthInfo() throws Exception {
setClientIdForFlow("NewRegistrar");
persistContactResource(true);
// Check that the persisted contact info was returned.
assertTransactionalFlow(false);
runFlowAssertResponse(
readFile("contact_info_response.xml"),
// We use a different roid scheme than the samples so ignore it.
"epp.response.resData.infData.roid");
assertNoHistory();
assertNoBillingEvents();
}
@Test
public void testFailure_neverExisted() throws Exception {
thrown.expect(