mirror of
https://github.com/google/nomulus
synced 2026-01-06 21:47:31 +00:00
Fix RDAP quirks uncovered during documentation
There's no reason not to allow a one-character search string when there are no wildcards. And the ROID validity pattern did not allow underscores, which was causing problems with our ROIDs. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=136256605
This commit is contained in:
@@ -72,6 +72,14 @@ public class RdapSearchPatternTest {
|
||||
RdapSearchPattern.create("ex*am.lol", true);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testShortString_ok() throws Exception {
|
||||
RdapSearchPattern rdapSearchPattern = RdapSearchPattern.create("e", true);
|
||||
assertThat(rdapSearchPattern.getInitialString()).isEqualTo("e");
|
||||
assertThat(rdapSearchPattern.getHasWildcard()).isFalse();
|
||||
assertThat(rdapSearchPattern.getSuffix()).isNull();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testPrefixTooShort_unprocessable() throws Exception {
|
||||
thrown.expect(UnprocessableEntityException.class);
|
||||
|
||||
Reference in New Issue
Block a user