mirror of
https://github.com/google/nomulus.git
synced 2025-07-22 10:46:10 +02:00
Redirect Registrar.referralUrl UI actions to url field
------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=196597051
This commit is contained in:
parent
de5645abd9
commit
6cdbde107f
23 changed files with 18 additions and 59 deletions
|
@ -214,12 +214,6 @@ public class RegistrarSettingsActionTest extends RegistrarSettingsActionTestCase
|
|||
doTestUpdate(Registrar::getWhoisServer, "new-whois.example", Registrar.Builder::setWhoisServer);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testUpdate_referralUrl() throws Exception {
|
||||
doTestUpdate(
|
||||
Registrar::getReferralUrl, "new-reference-url.example", Registrar.Builder::setReferralUrl);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testUpdate_phoneNumber() throws Exception {
|
||||
doTestUpdate(Registrar::getPhoneNumber, "+1.2345678900", Registrar.Builder::setPhoneNumber);
|
||||
|
|
|
@ -15,7 +15,6 @@
|
|||
package google.registry.ui.server.registrar;
|
||||
|
||||
import static com.google.common.truth.Truth.assertThat;
|
||||
import static google.registry.config.RegistryConfig.getDefaultRegistrarReferralUrl;
|
||||
import static google.registry.config.RegistryConfig.getDefaultRegistrarWhoisServer;
|
||||
import static google.registry.testing.CertificateSamples.SAMPLE_CERT;
|
||||
import static google.registry.testing.CertificateSamples.SAMPLE_CERT2;
|
||||
|
@ -53,12 +52,11 @@ public class SecuritySettingsTest extends RegistrarSettingsActionTestCase {
|
|||
Map<String, Object> response = action.handleJsonRequest(ImmutableMap.of(
|
||||
"op", "update",
|
||||
"args", modified.toJsonMap()));
|
||||
// Empty whoisServer and referralUrl fields should be set to defaults by server.
|
||||
// Empty whoisServer field should be set to default by server.
|
||||
modified =
|
||||
modified
|
||||
.asBuilder()
|
||||
.setWhoisServer(getDefaultRegistrarWhoisServer())
|
||||
.setReferralUrl(getDefaultRegistrarReferralUrl())
|
||||
.build();
|
||||
assertThat(response).containsEntry("status", "SUCCESS");
|
||||
assertThat(response).containsEntry("results", asList(modified.toJsonMap()));
|
||||
|
|
|
@ -44,7 +44,7 @@ public class WhoisSettingsTest extends RegistrarSettingsActionTestCase {
|
|||
.setEmailAddress("hello.kitty@example.com")
|
||||
.setPhoneNumber("+1.2125650000")
|
||||
.setFaxNumber("+1.2125650001")
|
||||
.setReferralUrl("http://acme.com/")
|
||||
.setUrl("http://acme.com/")
|
||||
.setWhoisServer("ns1.foo.bar")
|
||||
.setLocalizedAddress(
|
||||
new RegistrarAddress.Builder()
|
||||
|
|
|
@ -51,7 +51,7 @@
|
|||
"url": null,
|
||||
"icannReferralEmail": "asdf@asdf.com",
|
||||
"phonePasscode": null,
|
||||
"referralUrl": "",
|
||||
"url": "http://my.new.url",
|
||||
"blockPremiumNames": false,
|
||||
"lastCertificateUpdateTime": null,
|
||||
"e": false
|
||||
|
|
|
@ -7,6 +7,7 @@ localizedAddress.city: Williamsburg -> New York
|
|||
localizedAddress.zip: 11211 -> 10011
|
||||
phoneNumber: +1.2223334444 -> +1.2223335555
|
||||
emailAddress: new.registrar@example.com -> thase@the.registrar
|
||||
url: http://my.fake.url -> http://my.new.url
|
||||
contacts:
|
||||
ADDED:
|
||||
{parent=Key<?>(EntityGroupRoot("cross-tld")/Registrar("TheRegistrar")), name=Extra Terrestrial, emailAddress=etphonehome@example.com, phoneNumber=null, faxNumber=null, types=[ADMIN, BILLING, TECH, WHOIS], gaeUserId=null, visibleInWhoisAsAdmin=true, visibleInWhoisAsTech=false, visibleInDomainWhoisAsAbuse=false}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue