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:
larryruili 2018-05-14 17:49:57 -07:00 committed by jianglai
parent de5645abd9
commit 6cdbde107f
23 changed files with 18 additions and 59 deletions

View file

@ -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()));