mirror of
https://github.com/google/nomulus.git
synced 2025-05-13 07:57:13 +02:00
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:
parent
4813ed392b
commit
740d49e22e
4 changed files with 105 additions and 1 deletions
|
@ -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(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue